소스 검색

异步执行

陈德本 7 년 전
부모
커밋
7412dfbf98
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      hintData.php

+ 4 - 2
hintData.php

@@ -80,8 +80,10 @@ if (!$wd) {
     $wd = str_replace($origin_str, $des_str, $wd);
     $deep=$_REQUEST['deep']?:1;
 //    echo $cmd=sprintf("nohup /usr/local/php7.2/bin/php /home/wwwroot/wyt.phplife.net/cli.php %s %s > /home/wwwroot/wyt.phplife.net/wangyating.log &",$wd,$deep);
-    $cmd=sprintf("/usr/local/php7.2/bin/php /home/wwwroot/wyt.phplife.net/cli.php %s %s",$wd,$deep);
-    $str= shell_exec($cmd);
+    $cmd=sprintf("/home/wwwroot/wyt.phplife.net/cli.php %s %s",$wd,$deep);
+    pclose(popen($cmd, 'r'));
+//    $str= shell_exec($cmd);
+
     echo "任务提交成功!";
 //    echo "完成,总耗时".$second."秒";