ob_implicit_flush
Turn on/off implicit refresh
The ob_implicit_flush()
function is used to enable or disable implicit refresh.
When enabled, an implicit refresh will send the output to the browser immediately when it is generated, so that there is no need to call the flush()
function.
Send content to the browser immediately on each statement that produces the output:
<?php // Turn on implicit refresh ob_implicit_flush ( 1 ) ; // If the content is too short, some browsers will not display the content // We use str_pad() to make the output long enough echo str_pad ( "Hello World!" , 4096 ) ; // Even if the script is still running, the browser can already see the content sleep ( 3 ) ; ?>
ob_implicit_flush ( flag ) ;
parameter | describe |
---|---|
flag | When set to 1, implicit refresh is enabled. When set to 0, implicit refresh is disabled. |