note 75827 deleted from function.ob-flush by colder

From: Date: Mon, 18 Jun 2007 17:30:41 +0000
Subject: note 75827 deleted from function.ob-flush by colder
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-127541@lists.php.net to get a copy of this message
Note Submitter: deeps dot chennai at gmail dot com Reason: 2 ---- Well, I wouldnt care about ob_flush or flush! A common problem for all of us is: simply send out the data at one point in the script. Especially if we want to intelligently preload DIVs without making the user wait for that chunk of data. I had a bad experience that, Sajax uses ob_start(), so I couldnt quite count the buffers properly. The perfect solution was this single line of code: //send all buffers! while (@ob_end_flush()); Which would simply close ALL output buffers and send out the data. I tested with output_buffering ON and OFF and it works well. This information is provided in the manual page of ob_end_flush, but I think this is a more appropriate place.

« previous php.notes (#127541) next »