Asynchronous shell exec in PHP

前端 未结 13 2003

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:30

    In Linux, you can start a process in a new independent thread by appending an ampersand at the end of the command

    mycommand -someparam somevalue &
    

    In Windows, you can use the "start" DOS command

    start mycommand -someparam somevalue
    
    0 讨论(0)
提交回复
热议问题