如果是在linux下, 首先确认是否添加 ob_start() 和 ob_flush().
ob_start();
for ($i=1; $i echo $i."
\n";
ob_flush();
flush();
usleep(500000);
}
如果还是不能输出的话, 就在代码前面加上头信息
header("Content-Type:text/html;charset=utf8;");
ob_start();
for ($i=1; $i echo $i."
\n";
ob_flush();
flush();
usleep(500000);
}
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn