背景:我正在从PHP调用一个长时间运行的可执行文件(2分钟)。PHPs exec(longprocess)
函数等待进程终止,然后再运行下一个(例如,呈现HTML)。
我想要一个立即终止但允许我在后台运行程序的程序,这样我就可以执行exec(backgrounder longprocess)
,这就让longprocess
在后台运行。
您可以尝试start
命令:
exec("start someprogram.exe");
尝试并行处理:http://phplens.com/phpeverywhere/?q=node/view/254