Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1179315
  • 博文数量: 252
  • 博客积分: 5421
  • 博客等级: 大校
  • 技术积分: 2418
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-17 12:59
文章分类

全部博文(252)

文章存档

2017年(3)

2016年(18)

2015年(31)

2014年(18)

2013年(7)

2012年(8)

2011年(12)

2010年(30)

2009年(32)

2008年(57)

2007年(36)

分类:

2007-12-17 11:39:06

<?php
date_default_timezone_set('asia/shanghai');
$starttime = date('h:i:s');
set_time_limit(30);
echo 'ignore_user_abort:'.ignore_user_abort().'
'
;
ignore_user_abort(true);
echo 'ignore_user_abort:'.ignore_user_abort().'
'
;
$i=1;
while(1){
    if(!connection_aborted()){
        echo "hello!!!--$i
"
;
        ob_flush();
        flush();
        sleep(1);
        $i++;
    }else{
        $endtime = date('h:i:s');
        $status = 'seconds:'."$i\t connection status:".connection_status()."\t connection_aborted:".connection_aborted();
        file_put_contents('stop.txt',"$starttime -> $endtime : stop \r\n$status");
        exit();
    }
}
?>

阅读(2711) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~