我试图在循环之间建立一个延迟的PHP循环 这不起作用
<= 66 [us/message]
我试图将此作为输出:
Context()
答案 0 :(得分:0)
尝试使用flush和ob_flush在脚本完成之前将输出发送到浏览器:
<?php
header( 'Content-type: text/html; charset=utf-8' );
$i=0;
while(true) {
$i++;
echo $i;
flush();
ob_flush();
sleep(1);
}
?>