note 58917 added to function.flush
| From: | PuTTYshell at osu1 dot php dot net | Date: | Sun, 20 Nov 2005 15:06:28 +0000 |
| Subject: | note 58917 added to function.flush | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-98855@lists.php.net to get a copy of this message | ||
<?php
header('Content-type: multipart/x-mixed-replace;boundary=endofsection');
print "\n--endofsection\n";
$pmt = array("-", "\\", "|", "/" );
for( $i = 0; $i <10; $i ++ ){
sleep(1);
print "Content-type: text/plain\n\n";
print "Part $i\t".$pmt[$i % 4];
print "--endofsection\n";
ob_flush();
flush();
}
print "Content-type: text/plain\n\n";
print "The end\n";
print "--endofsection--\n";
?>
Server Push with "multipart/x-mixed-replace", tested on Firefox 1.07.
This is an example requiring both ob_flush and flush.
----
Manual Page -- http://www.php.net/manual/en/function.flush.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+58917
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58917&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58917&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58917&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58917&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58917&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58917&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58917&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+58917&report=yes
Search -- http://master.php.net/manage/user-notes.php