我想用popen/exec
启动后台进程(执行php脚本)。无法启动后台进程在Windows中运行PHP脚本IIS服务器
我试过proc_open
---但导致无限循环&在一段时间后终止500内部错误。
与popen/exec
- 没有错误&同时背景脚本也没有运行。
我的当前结构是这样的:
test.php的
$processHandle = popen("start /b php background.php", "r");
background.php
$file = fopen("test.txt","w");
echo fputs($file,"Hello World. Testing!");
fclose($file);
i到命令提示尝试:PHP test.php的
它启动后台进程和fil Ë被创建
我试图通过web浏览器请求运行相同的脚本: 它不工作&不给错误也是如此。
请帮忙吗?
你使用的是什么操作系统? –