开发者

shell_exec without waiting for the output [duplicate]

开发者 https://www.devze.com 2023-03-08 09:12 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: Asynchronous shell exec in PHP
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Asynchronous shell exec in PHP

Is there a way to use shell_exec without waiting for the command to complete?

I want to run a 开发者_开发知识库quite slow / complex program which takes at least 10 minutes to complete. I want to call this via shell_exec or something similar, but I dont want the php script to wait for the completion of this program.

is thing something I can do? and if so how can I do that?


This has been answered before at Asynchronous shell exec in PHP

Briefly:

shell_exec( $your_command . "> /dev/null 2>/dev/null &" );
0

精彩评论

暂无评论...
验证码 换一张
取 消