【发布时间】:2012-02-05 20:24:59
【问题描述】:
我已经尝试了在谷歌搜索中找到的基本的,甚至尝试自己写一个,但是我一直遇到问题。似乎是在服务器端下载内容或其他东西,然后将其推送给用户,该用户已经下载了。它会打开下载页面,大约需要 10 秒的时间来下载,然后将文件完整地提供给用户,这看起来像是没有下载。
我想知道是否已经编写了任何类来限制下载速度,或者我该如何解决这个问题。
我现在有这个;
header("Content-type: application/force-download");
header("Content-Transfer-Encoding: Binary");
header("Content-length: ".filesize("uploads/$filename"));
header("Content-disposition: attachment; filename=\"$origname");
readfile("uploads/$filename");
谢谢!
【问题讨论】:
-
是的,但我有不同的问题