php.ini 里面的output_buffering 要设置为 Off 并重启apache
ob_start();
while(some condition){
foreach($somethings as $something){
// your sentences are here
echo 'something' . '<br />'.
}
ob_flush();
flush();
sleep(1);
**echo '<script>document.body.innerHTML="";</script>';**
}