//test.php
for($i=0; $i<10; $i++){
pclose(popen('php for.php &>>'.$i.'log &', 'r'));
}
//end
//for.php
ignore_user_abort(TRUE);//客户端断开脚本仍继续执行
for($i=0; $i<100; $i++){
echo $i;
sleep(1);
}
//end
写好上面两个脚本,执行test.php测试
//test.php
for($i=0; $i<10; $i++){
pclose(popen('php for.php &>>'.$i.'log &', 'r'));
}
//end
//for.php
ignore_user_abort(TRUE);//客户端断开脚本仍继续执行
for($i=0; $i<100; $i++){
echo $i;
sleep(1);
}
//end
写好上面两个脚本,执行test.php测试