note 39304 deleted from function.flush by danbrown
| From: | danbrown@php.net | Date: | Sat, 14 Feb 2009 06:09:56 +0000 |
| Subject: | note 39304 deleted from function.flush by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-150662@lists.php.net to get a copy of this message | ||
Note Submitter: phpnote at mijav dot dk
----
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.