In wamp server, I cannot flush the output buffer unless I use these functions:
ob_end_flush(); ob_flush(); flush(); ob_start(); Why do I need to use all of these functions? Why does simple ob_flush() is not working? my code :
<?php ob_start(); header( 'Content-type: text/html; charset=utf-8' ); echo 'Begin ...<br />'; for( $i = 0 ; $i < 6 ; $i++ ) { echo $i . '<br />'; sleep(1); ob_end_flush(); ob_flush(); flush(); ob_start(); } echo 'End ...<br />'; ?>