我想做到这一点,没有“ReadFile的()”部分:PHP(或Flash)文件下载 - 套头然后重定向
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的($文件)功能将不能为我做的,因为在$文件不被存储在同一服务器作为PHP脚本(甚至不是同一个数据中心)
这甚至可能吗?如果不是通过PHP,也许FLASH可以做到这一点?
谢谢回答,我不想这个,因为我们正在谈论的文件可能大小为1GB ..我需要保存带宽。 – Gotys 2011-02-03 08:43:13