코드를 찾는 것은 메모리 제한 때문에 큰 파일에는 오류가 있다고 생각합니다. 스크립트는 전체 파일을 보내기 전에 메모리에있는 file_get_contents()
을 통해 전체 파일을 읽습니다. 나는 1GB 파일> 것입니다 의심되는 메모리 문제가 발생합니다. download.php 스크립트에 다음 줄을 교체하십시오 :
//get the file content
$strFile = file_get_contents($strDownload);
//set the headers to force a download
header("Content-type: application/force-download");
header("Content-Disposition: attachment;
filename=\"".str_replace(" ", "_", $arrCheck['file'])."\"");
//echo the file to the user
echo $strFile;
에 :
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($strDownload));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($strDownload));
ob_clean();
flush();
readfile($strDownload);
이 도움이 될 수 있습니다. 매뉴얼에서
참고 : 에서 ReadFile(), 모든 메모리 문제를 제시 심지어 자신의
덕분에, 큰 파일을 보낼 때, 그러나 didnt 한 도움 ... 작은 파일이 잘 다운로드하지만 큰의 경우되지 않습니다 디스플레이 파일을 찾을 수 없습니다. – user3249713