note 105616 added to function.ob-implicit-flush

From: Date: Thu, 01 Sep 2011 01:46:56 +0000
Subject: note 105616 added to function.ob-implicit-flush
Groups: php.notes 
Request: Send a blank email to php-notes+get-182874@lists.php.net to get a copy of this message
I found this on stackoverflow.com: http://stackoverflow.com/questions/3133209/how-to-flush-output-after-each-echo-call/4978809#4978809 This code works for flushing the output buffer without explicitly calling flush after every echo. I found that the real trick here is filling the output buffer to the minimum size required to flush. Example: ob_implicit_flush(1); for($i=0; $i<10; $i++){ echo $i; //this is for the buffer achieve the minimum size in order to flush data echo str_repeat(' ',1024*64); sleep(1); } ---- Server IP: 208.69.120.55 Probable Submitter: 67.86.199.99 ---- Manual Page -- http://www.php.net/manual/en/function.ob-implicit-flush.php Edit -- https://master.php.net/note/edit/105616 Del: integrated -- https://master.php.net/note/delete/105616/integrated Del: useless -- https://master.php.net/note/delete/105616/useless Del: bad code -- https://master.php.net/note/delete/105616/bad+code Del: spam -- https://master.php.net/note/delete/105616/spam Del: non-english -- https://master.php.net/note/delete/105616/non-english Del: in docs -- https://master.php.net/note/delete/105616/in+docs Del: other reasons-- https://master.php.net/note/delete/105616 Reject -- https://master.php.net/note/reject/105616 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#182874) next »