note 106452 added to function.readfile

From: Date: Thu, 10 Nov 2011 13:02:26 +0000
Subject: note 106452 added to function.readfile
Groups: php.notes 
Request: Send a blank email to php-notes+get-184372@lists.php.net to get a copy of this message
When downloading files with the readFile the browser page is pausing untill the download is finished. How can you avoid this? header('Content-Type: audio/x-ms-wma'); header('Content-Disposition: attachment; filename='.basename($file)); 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($file)); ob_clean(); flush(); set_time_limit(0); readfile($file); ---- Server IP: 83.137.20.135 Probable Submitter: 82.148.206.127 ---- Manual Page -- http://www.php.net/manual/en/function.readfile.php Edit -- https://master.php.net/note/edit/106452 Del: integrated -- https://master.php.net/note/delete/106452/integrated Del: useless -- https://master.php.net/note/delete/106452/useless Del: bad code -- https://master.php.net/note/delete/106452/bad+code Del: spam -- https://master.php.net/note/delete/106452/spam Del: non-english -- https://master.php.net/note/delete/106452/non-english Del: in docs -- https://master.php.net/note/delete/106452/in+docs Del: other reasons-- https://master.php.net/note/delete/106452 Reject -- https://master.php.net/note/reject/106452 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184372) next »