php backgroup proccess

 

 

一個開 process 的例子:

<?php
 echo date("Y-m-d H:i:s"),"\n";
 foreach(range(1,100) as $i){
         exec("php /home/vhosts/domain/public_html/wait.php >> /root/log.txt 2>&1 &");

 }
 echo date("Y-m-d H:i:s")."\n";
?>

 

Creative Commons license icon Creative Commons license icon