【发布时间】:2017-10-20 08:24:00
【问题描述】:
我的网站在http://domain1.com,我想从另一个域http://domain2.com/uploads/data.zip 下载一些.zip 文件,但没有下载并显示302 移动临时错误。我正在使用 cURL 代码。
header('Access-Control-Allow-Origin: http://www.domain2.com');
header('Content-Length: '.filesize($response));
header('Content-Type: application/zip');
header('Content-Transfer-Encoding: Binary');
header("Content-Disposition: attachment; filename=my.zip");
//readfile($response);
header("Location:$response");
【问题讨论】:
-
卷曲代码在哪里??