【发布时间】:2013-02-21 16:49:10
【问题描述】:
我目前正在使用此代码隐藏下载链接,但它为某些用户提供了未完成的下载。我不知道为什么,但是太多的用户向我报告了这个问题。 我当前的代码是:
file = "../".$realFileName;
$fakeFileName= 'Upbaz.ir-'.base64_decode($_GET['ffname']);
$fp = fopen($file, 'rb');
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=$fakeFileName");
header("Content-Length: " . filesize($file));
fpassthru($fp);
有人知道隐藏下载链接的其他方法吗?
【问题讨论】: