flush
Refresh the system output buffer
The lush()
function requests the server to send its currently buffered output to the browser. Server configuration may not always allow this to happen.
Output a string to the browser before the script is finished running:
<?php // If the content is too short, some browsers will not display // We use str_pad() to make the output long enough echo str_pad ( "Hello World!" , 4096 ) ; // Use flush() to send strings to the browser flush ( ) ; // Show the rest in three seconds sleep ( 3 ) ; echo "<br>" ; echo "Hello World!" ; ?>
Try it yourself
flush ( ) ;