Re: ob_output

From: Date: Fri, 22 Nov 2002 19:43:06 +0000
Subject: Re: ob_output
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-125651@lists.php.net to get a copy of this message
You need to use flush() to try and send a chunked response that will display on the user's browser line at a time like that. Output buffering is fairly closely related I suppose, but it is a separate thing. As far as I know, you cannot flush() with output buffering started unless you end or flush that output buffering first. However, output buffering is not required for what you are wanting to do, so only use it if you also need that. I wrote a quick little example of displaying a bulleted list one item at a time that might be helpful to you: http://shiflett.org/tutorials/php_flush.txt Chris --- Uros Gruber <uros.gruber@sir-mag.com> wrote: > <?php > ob_start(); > for ($n=1;$n<10;$n++) { > echo "test<br>"; > ob_end_flush(); > sleep(2); > } > ?> > > I can make this work on php and apache. I always get output > in one shot not line by line.

« previous php.general (#125651) next »