可在后台老板执行的PHP代码

WBOY
Release: 2016-06-13 13:09:41
Original
1022 people have browsed it

可在后台执行的PHP代码
ignore_user_abort();
set_time_limit(0);
$interval=10;
$i = 1;
do{
    $fp = fopen('test/text'.$i.'.txt','a');
    fwrite($fp,'test'.$i);
    fclose($fp);
    sleep($interval);
    $i++;
}while(true);

惊险的代码,关闭浏览器后程序还一直在运行,生成了N个.txt的文件..

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template