PHP script serving files stops after few seconds -


i have small php scripts, serves files. simple download server.

i use following code:

$mm_type="application/octet-stream"; header("pragma: public"); header("expires: 0"); header("cache-control: must-revalidate, post-check=0, pre-check=0"); header("cache-control: public"); header("content-description: file transfer"); header("content-type: " . $mm_type); header("content-length: " .(string)(filesize($path)) ); header('content-disposition: attachment; filename="'.basename($path).'"'); header("content-transfer-encoding: binary\n"); readfile($path); // outputs content of file exit(); 

i stops download file after 10-15 seconds. when retry download file, exactly stops @ same filesize. example file 4gb, stops downloading @ 230mb, when restart download, again stops @ 230mb.

what wrong script?


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -