Asynchronous shell exec in PHP

前端 未结 13 2187

I\'ve got a PHP script that needs to invoke a shell script but doesn\'t care at all about the output. The shell script makes a number of SOAP calls and is slow to complete,

13条回答
  •  执笔经年
    2020-11-22 01:05

    The only way that I found that truly worked for me was:

    shell_exec('./myscript.php | at now & disown')
    

提交回复
热议问题