[英]Do not wait for a respondse of PHP shell_exec
Is it possible to skip waiting for a response of a shell execution command? 是否可以跳过等待shell执行命令的响应?
The command executes aria2c and places a file to the download queue. 该命令执行aria2c并将文件放置到下载队列中。 Therefore I do not have to wait for the response.
因此,我不必等待响应。 Otherwise I run into a "Internal Server Error" because of max execution time is reached.
否则,由于达到了最大执行时间,我遇到了“内部服务器错误”。
you should use exec()
and redirect the output to a file or null it will then run in the back ground 您应该使用
exec()
并将输出重定向到文件或将其输出为null,然后它将在后台运行
If a program is started with this function, in order for it to continue running in the background, the output of the program must be redirected to a file or another output stream.
如果使用此功能启动程序,则要使其在后台继续运行,必须将程序的输出重定向到文件或其他输出流。 Failing to do so will cause PHP to hang until the execution of the program ends.
否则,PHP会挂起,直到程序执行结束。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.