Re: best way to flush stdout?
| From: | Markus Fischer | Date: | Mon, 21 May 2001 17:57:24 +0000 |
| Subject: | Re: best way to flush stdout? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-53761@lists.php.net to get a copy of this message | ||
On Mon, May 21, 2001 at 10:03:33AM -0700, Phil Glatz wrote :
> I have a page that displays a few lines, then runs a database query that
> takes five or six seconds. I'd like to flush stdout and display the first
> text while the query is running, so the user doesn't think the site is
> down. What's the best way to accomplish this? thanks
Make sure output is not buffered via ob_* functions and just call
'flush()'.
But note there's no real world fix because browsers can refuse to
display immdiatly (depending on its rendering engine, etc) and
apache can cache the output, too.
- Markus