note 39304 added to function.flush
| From: | phpnote at mijav dot dk | Date: | Fri, 23 Jan 2004 20:46:49 +0000 |
| Subject: | note 39304 added to function.flush | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-64082@lists.php.net to get a copy of this message | ||
If you are having trouble makeing flush(); or ob_flush(); work the way you want, try both of them.
Using PHP 4.3.3RC1 there was no effect using flush() or ob_flush(), however a combination of both
gave me perfect results.
Example:
<?
echo str_repeat(" ", 256);
$i = 100;
while($i > 0)
{
echo $i." bottle".($i != 1 ? 's' : '')." of beer on the wall,
".$i." bottle".($i != 1 ? 's' : '')." of beer. Take one down
and pass it around, ".(--$i)." bottle".($i != 1 ? 's' :
'')." of beer on the wall<br>\n";
flush();
ob_flush();
usleep(50000);
}
?>
This could be the result of a server-issue - maybe you are using a public server that has OB enabled
by default.
----
Manual Page -- http://www.php.net/manual/en/function.flush.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39304
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39304&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39304&report=yes
Search -- http://master.php.net/manage/user-notes.php