> -----Original Message-----
> From: electroteque [mailto:[EMAIL PROTECTED]]
> Sent: 19 December 2002 07:52
> 
> sorry about the false alarm , if you go here u will see a 
> working example
> 
> http://galleries.dyndns.org:1023/progress.php
> 
> i had to add both flush functions together to work , 
> obviosuly flsuh is not
> emptying the buffer within a loop, is this still a bug ?
> 
> flush();
>  ob_flush();

Well, if you use PHP's output buffering, you actually have two buffers: the "output 
buffer" which can be manipulated and accessed from within your script using the ob_*() 
functions, and what might be called the "connection buffer" which exists in the 
general PHP environment and is not accessible to your script, but can be flushed with 
the flush() function or by setting implicit_flush to on.

When you do ob_flush(), this flushes the output buffer to the connection buffer; 
flush() flushes the connection buffer, via the HTTP connection, to your browser.  (The 
browser may then buffer it itself, e.g. whilst waiting for a </table> tag to show up, 
but that's another matter!)  So, yes, if you have output buffering on you need both 
ob_flush() and flush() (in that order!) to flush all pending output to the browser.

For your application, I would question whether you need output buffering on -- it 
seems to be causing you problems rather than solving them!

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to