note 75827 added to function.ob-flush

From: Date: Sun, 17 Jun 2007 20:40:26 +0000
Subject: note 75827 added to function.ob-flush
Groups: php.notes 
Request: Send a blank email to php-notes+get-127518@lists.php.net to get a copy of this message
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. ---- Server IP: 203.16.234.19 Probable Submitter: 122.167.146.65 ---- Manual Page -- http://www.php.net/manual/en/function.ob-flush.php Edit -- https://master.php.net/note/edit/75827 Del: integrated -- https://master.php.net/note/delete/75827/integrated Del: useless -- https://master.php.net/note/delete/75827/useless Del: bad code -- https://master.php.net/note/delete/75827/bad+code Del: spam -- https://master.php.net/note/delete/75827/spam Del: non-english -- https://master.php.net/note/delete/75827/non-english Del: in docs -- https://master.php.net/note/delete/75827/in+docs Del: other reasons-- https://master.php.net/note/delete/75827 Reject -- https://master.php.net/note/reject/75827 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#127518) next »