|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-03-19 11:27 UTC] dietrich dot ayala at foundstone dot com
In this example, php doesn't flush it's buffer until the after fclose(); I'm testing w/ a 10mb text file.
<?php
if (($f = fopen($very_large_file, 'r')) != 0) {
while ( !feof($f) ) {
echo fread($f, 4096);
flush();
}
fclose($f);
}
?>
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 15:00:02 2025 UTC |
Also describe your file (does it contain lin breaks? are they DOS line breaks {\r\n}, unix line breaks {\n}, or Mac line breaks {\r}), and output buffering conditions (The output of phpinfo(); would be most helpful).