开发者

shell_exec without waiting for the output [duplicate]

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜