时间:2021-07-01 10:21:17 帮助过:14人阅读
- set_time_limit(0); // 执行时间为无限制,php默认执行时间是30秒,可以让程序无限制的执行下去
- $interval=120;
- do{
- $sql="select CPUTotal,UpdateTime from systemcpu where SystemID=$KeyID";
- $result=mysql_query($sql);
- $rows=mysql_fetch_array($result);
- $GetTime= (strtotime($rows["UpdateTime"])-8*60*60)*1000;
- sleep($interval);
- }while(true);
do {
........
while(true);
这是死循环,当然要一直等待下去
好的 已经知道了
我试试使用ajax来实现