note 25496 deleted from function.flush by sniper
| From: | sniper@php.net | Date: | Mon, 13 Oct 2003 01:35:56 +0000 |
| Subject: | note 25496 deleted from function.flush by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58459@lists.php.net to get a copy of this message | ||
Note Submitter: mikael at lirbank dot com
----
I wanted to flush the page in a loop (making several fopen connections to test if links are valid).
Neither flush() nor ob_flush() worked, but TOGETHER they work.
I use Apache 1.3 and PHP 4.2.3, IE6SP1 or NC4.78
The flushing is also a little different between the two browsers. NC seem to flush row-wise, where
IE flushes (as told) after each URL is printed (see below).
Example ($urlsArray holds a number of URLs to be tested):
foreach( $urlsArray as $value ) {
echo( $value );
ob_flush();
flush();
if( $fp = @fopen( $value, 'r' ) ) {
echo( ' - OK' . "\n" );
fclose( $fp );
} else {
echo( ' - <b>FALSE!</b>' . "\n" );
}
}