【发布时间】:2011-06-20 12:01:28
【问题描述】:
我想这样做,没有“readfile()”部分:
header("Content-type: application/force-download");
header("Content-Transfer-Encoding: Binary");
header("Content-length: ".filesize($file));
header("Content-disposition: attachment; filename="".basename($file).""");
readfile("$file");
基本上我正在尝试将下载转发到另一个 URL,但同时我需要能够设置像“文件名”这样的标题。
readfile($file) 函数不会为我做这件事,因为 $file 没有存储在与 PHP 脚本相同的服务器上(甚至不是相同的数据中心)
这甚至可能吗?如果不是通过 PHP,也许 FLASH 可以做到这一点?
【问题讨论】: