→ backfish :自己解決了 官網討論區說要加 ob_end_flush(). 09/10 13:33
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 211.75.77.172
我的程式碼如下, 用來直接下載檔案,
可是發現除了一個145MB的檔案會無法執行外、其他最多不超60MB的檔案都可執行
請問是否是檔案大小的限制? 或是其他因素? 如何修正? 謝謝
$size=filesize($abc_file);
header("Content-Length: {$size} ");
header("Content-type: application/octet-stream; charset=big5");
header("Accept-Ranges: bytes");
header("Pragma: public");
header("Content-Disposition: attachment; filename=\"{$downloadfilename}\"");
header("Pragma: no-cache");
header("Expires: 0");
readfile($abc_file);
--