我创建了一个使用psexec调用另一个脚本的脚本,该脚本调用psexec来运行我的命令行程序。在Windows的后台运行PHP“exec()”?
对psexec和其他脚本进行如此多的调用的原因完全是为了让我的PHP脚本不必等到该过程完成才能输出到浏览器。
有没有办法可以做到这一点,而无需使用psexec?我在使用psexec时遇到了问题,所以我想从程序中彻底删除它。
我运行Windows 2008
编辑:我改变了标题,我想这将是一个更准确的标题。我在012.net的网页上找到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.
exec()
,但不知道该怎么做。
究竟是你想做些什么?只是好奇,因为我不知道有一种方法可以脱离使用后台脚本... – espradley