PHP 通过命令异步执行PHP程序

通过PHP执行系统命令调用PHP执行程序,让进程挂起到后台执行,不影响用户页面交互。

控制器调用命令,不用等待,后台创建一个进程执行程序。

system(“nohup php command.php contorller/action/param/value $s > /dev/null &”);

 

posted @ 2018-11-02 14:01  laushow  阅读(1508)  评论(0编辑  收藏  举报