sleep
(PHP 3, PHP 4, PHP 5)sleep -- Delay execution
Description
int sleep ( int seconds )
The sleep() function delays program execution for the given number of seconds.
(PHP 3, PHP 4, PHP 5)sleep -- Delay execution
Description
int sleep ( int seconds )
The sleep() function delays program execution for the given number of seconds.
解决方案 »
- 提问Php学习流程的问题
- 新手 我刚安装php+Apache2.2,不执行php代码
- 如何把excel文件导入mysql?
- php代码编译器的下载
- 关于一个正则表达式的问题,请帮忙!
- 关于新闻的置顶和实现!
- 请问这段上传代码为什么在服务器通过,在本地不行??解决后立即结帖
- 在Linux下的Apache启动时提示"Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName" ?
- 看看出了什么问题!
- 关于查询整个站点函数的疑问
- 有那个高人在linux上写过php吗?
- php zend 照着网上例子为何总是出错!!!
<?php
echo 12312;
sleep(3);
echo 12312;
sleep(2);
echo 1321312;
?>
这样写都是等够6秒,再一下显示出来.
用JS,又如何写呢?
参照一下吧
结合setTimeout()就OK啊~~~ 不过这样请求是不是有点太多了??也可以一次性把数据取出来,再在客户端用setTimeout()控制隔X秒输出一条记录.这样对服务器的压力小,同时能达到你要的效果.