让PHP程序永远在后台运行

Run Settings
LanguagePHP
Language Version
Run Command
<?php ignore_user_abort(); // 后台运行 set_time_limit(0); // 取消脚本运行时间的超时上限 do{ echo 'Ms_svip2098175794@vipqq.com';//要执行的代码 sleep(60); // 休眠1分钟;休眠60秒 }while(true); ?> //除非在服务器上关闭这个程序,否则这断代码将永远定时执行下去。
<?php ignore_user_abort(); // 后台运行 set_time_limit(0); // 取消脚本运行时间的超时上限 echo 'start.'; while(!file_exists('close.txt')){//要执行的代码 $fp = fopen('test.txt','a+');//要执行的代码 fwrite($fp,date("Y-m-d H:i:s") . " 成功了!rn");//要执行的代码 fclose($fp);//要执行的代码 sleep(10);//要执行的代码 }//php代码 echo 'end.'; ?>
Editor Settings
Theme
Key bindings
Full width
Lines