Home > Backend Development > PHP Tutorial > 使用do while 或者while循环中加个sleep,然后页面就会等待很久才能加载出来

使用do while 或者while循环中加个sleep,然后页面就会等待很久才能加载出来

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-20 12:46:13
Original
2675 people have browsed it


回复讨论(解决方案)

要它立即 刷出页面,然后等待3秒,重复执行操作

do{    echo "11"."<br>";    flush();    ob_flush();   sleep(1);}while(true);
Copy after login

那你需要先执行,再等待
while(1){
echo 'hello world';
ob_flush();
flush();
sleep(3);
}

感谢,有用哈哈

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template