note 103621 added to function.readfile

From: Date: Fri, 22 Apr 2011 23:46:35 +0000
Subject: note 103621 added to function.readfile
Groups: php.notes 
Request: Send a blank email to php-notes+get-179098@lists.php.net to get a copy of this message
In response to Sguiggz: I was having the same problem with dynamically generated text and ZIP files. I believe my problem is the same as what Zambz called out (gzip compression for the transfer), so rather than just adding 1 to the filesize, I added 1KB (1024). <?php $filesize = filesize($filename); header('Content-Length: '.($filesize+1024)); ?> So far that seems to be working really well for me. ---- Server IP: 69.147.83.197 Probable Submitter: 208.79.252.143 ---- Manual Page -- http://www.php.net/manual/en/function.readfile.php Edit -- https://master.php.net/note/edit/103621 Del: integrated -- https://master.php.net/note/delete/103621/integrated Del: useless -- https://master.php.net/note/delete/103621/useless Del: bad code -- https://master.php.net/note/delete/103621/bad+code Del: spam -- https://master.php.net/note/delete/103621/spam Del: non-english -- https://master.php.net/note/delete/103621/non-english Del: in docs -- https://master.php.net/note/delete/103621/in+docs Del: other reasons-- https://master.php.net/note/delete/103621 Reject -- https://master.php.net/note/reject/103621 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#179098) next »