Home >Backend Development >PHP Tutorial >PHP uses flush() ob_flush() to output strings one by one_PHP tutorial
In the past, js was used to instantiate chat rooms or non-refresh output. In fact, php can be implemented separately. In php, we can use flush() ob_flush().
ob_end_clean(); //Clear the output cache and close the cache
echo str_pad(' ',256);//Output 256 bytes of space (under the IE browser, more than 256 bytes must be accepted before the output is displayed
)
The code is as follows
|
Copy code
|
||||
for($i=0;$i< 5;$i++){ |
sleep(1);
http://www.bkjia.com/PHPjc/631645.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631645.htmlTechArticleIn the past, js was used to instantiate chat rooms or non-refresh output. In fact, php can be implemented separately. In php We can use flush() ob_flush(). ob_end_clean(); //Clear the output cache...