RE: [PHP] Flush()....go to bottom of page (might be 0T)
| From: | Ford, Mike [LSS] | Date: | Mon, 09 Aug 2004 09:15:22 +0000 |
| Subject: | RE: [PHP] Flush()....go to bottom of page (might be 0T) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-193181@lists.php.net to get a copy of this message | ||
On 07 August 2004 23:24, PHP Gen wrote:
> This is what i am using:
>
> for($i=0; $i<1000;$i++)
> {
> echo "something<br>";
> echo str_repeat(" ", 256); flush(); ob_flush();
> sleep(1);
> }
Regardless of solving your scrolling problem, these flush calls are the
wrong way round -- ob_flush() flushes to the layer which is flushed by
flush(), so you should be doing
ob_flush(); flush();
to get an immediate flush of the thing just echoed.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211