note 55609 added to function.flush
| From: | StanV at osu1 dot php dot net | Date: | Mon, 08 Aug 2005 20:15:46 +0000 |
| Subject: | note 55609 added to function.flush | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-93271@lists.php.net to get a copy of this message | ||
So will this:
<?php
for ($i = 0; $i<10; $i++){
echo "<br> Line to show.";
echo str_pad('',4096)."\n";
flush();
sleep(2);
}
echo "Done.";
?>
I've not found a case where I need to use ob_flush() if I never started caching the buffer in
the first place.
There seems to be some confusion you have to start buffering the output to make sure you flush it
later with both commands.
If you don't need to buffer with ob_*, only flush() is enough in my experience.
----
Manual Page -- http://www.php.net/manual/en/function.flush.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55609
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55609&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55609&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55609&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55609&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55609&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55609&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55609&report=yes
Search -- http://master.php.net/manage/user-notes.php