some problems with ob_flush() and flush() could be resolved by defining content type header :
header( 'Content-type: text/html; charset=utf-8' );
so working code looks like this:
header( 'Content-type: text/html; charset=utf-8' );
echo 'Begin ...
';
for( $i = 0 ; $i < 10 ; $i++ )
{
echo $i . '
';
flush();
ob_flush();
sleep(1);
}
echo 'End ...
';
?>
0 意見:
張貼留言