php - output echo'd contents in browser while script is running?
D开发者_开发知识库oes anyone know how to output stuff I echo to a browser while the script is running?
I have a long loop that I'd like to output a string after every run of the loop, kind of like a progress bar, does anyone know how to do that?
Use the ob_flush()
function:
ob_start();
//echo stuff...
ob_flush();
//echo more stuff...
ob_flush();
精彩评论