我想动态地回显字符串,而不是在脚本完成运行时一次全部回显。试过这个,但是当脚本完成运行时它会回显所有这些。如何动态回显值?
<?php
ob_start();
echo "Line #1...<br>";
ob_flush();
flush();
sleep(2);
echo "Line #2...<br>";
ob_flush();
flush();
sleep(2);
echo "Line #4...<br>";
?>
我想动态地回显字符串,而不是在脚本完成运行时一次全部回显。试过这个,但是当脚本完成运行时它会回显所有这些。如何动态回显值?
<?php
ob_start();
echo "Line #1...<br>";
ob_flush();
flush();
sleep(2);
echo "Line #2...<br>";
ob_flush();
flush();
sleep(2);
echo "Line #4...<br>";
?>