我有一個PHP文件提供一個文件,但問題是無論使用什麼瀏覽器,如果您點擊2個鏈接轉到2個單獨的文件,第二個下載不會啓動,直到第一個做完了!有任何想法嗎?使用PHP下載文件 - 一次只下載一個文件!
下載代碼
header('Content-Type: application/octet-stream');
header('Content-Description: File Transfer');
header('Content-Disposition: attachment; filename="'.basename($filename).'"');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($fullpath));
readfile($fullpath);
示例鏈接
- 鏈接1:的download.php downloadfile = 1個
- 鏈路2:?的download.php downloadfile = 2
你確信Apache不限制併發連接數?有些安裝可以做到 – 2009-10-22 21:53:29
什麼是服務器的操作系統?你使用的是Apache嗎?你max_concurrant_settings是什麼樣的? – 2009-10-22 21:54:18
服務器是運行Apache的Linux服務器。哪裏可以找到max_concurrent_settings設置? – 2009-10-22 22:08:59