sleep 做挂在服务器定时操作功能

时间:2014-10-15 17:45:02   收藏:0   阅读:307
<?php


 
//关闭浏览器后,程序能继续在后台跑,这种情况下需要用到ignore_user_abort()函数
ignore_user_abort(true); 
set_time_limit(0);
file_put_contents("heh.php","等20秒后,查看界面,还会有信息显示");


sleep(20);


file_put_contents("heh.php","***********************20秒过后了!!!");

原文:http://blog.csdn.net/qq1355541448/article/details/40113011

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!