note 103621 deleted from function.readfile by danbrown
| From: | danbrown@php.net | Date: | Sat, 23 Apr 2011 00:45:33 +0000 |
| Subject: | note 103621 deleted from function.readfile by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-179099@lists.php.net to get a copy of this message | ||
Note Submitter: randy angrychimp.net
----
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.