【发布时间】:2011-10-07 19:55:51
【问题描述】:
我创建了一个脚本,它使用 psexec 调用另一个脚本,该脚本调用 psexec 来运行我的命令行程序。
对 psexec 和其他脚本进行如此多调用的原因仅仅是为了让我的 PHP 脚本不必等待进程完成再将其输出到浏览器。
有没有一种方法可以在不需要使用 psexec 的情况下做到这一点?我遇到了 psexec 的问题,所以我想将它从我的程序中完全删除。
我正在运行 Windows 2008
编辑:我更改了标题,我想这将是一个更准确的标题。我在exec() 的php.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.,但不知道该怎么做。
【问题讨论】:
-
你到底想做什么?只是好奇,因为我不确定除了使用后台脚本之外还有其他方法可以解决...