[請益] 用header下載檔案是否有限制大小

看板PHP作者 (121)時間16年前 (2009/09/10 13:30), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
我的程式碼如下, 用來直接下載檔案, 可是發現除了一個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); -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 211.75.77.172

09/10 13:33, , 1F
自己解決了 官網討論區說要加 ob_end_flush().
09/10 13:33, 1F
文章代碼(AID): #1Ag8xrbS (PHP)
文章代碼(AID): #1Ag8xrbS (PHP)