我只想在每个整数之间以 10 秒的间隔打印从 1 到 10 的计数。
例如。
$i=10; //Time delay
for($j=1;$j<11;$j++)
{
echo $j;
//do something to delay the execution by $i seconds
}
我已经尝试了一切including flush(),但我得到的只是一个冻结的屏幕ob_flush(),ob_implicit_flush()直到整个时间都被执行。