![](/img/trans.png)
[英]PHP Exec: Without Waiting, Without Discarding the Output, Without nohup
[英]nohup on windows, exec without waiting for finish
Windows有這樣的東西嗎?
exec("nohup /usr/bin/php -f sleep.php > /dev/null 2>&1 &");
它並不難(雖然有一些細微的差別)......你只需要使用WScript.Shell
COM對象:
$shell = new COM("WScript.Shell");
$shell->run($command, 0, false);
而已...
默認情況下,Windows命令start不會等待子進程。 您可能希望/b
開關避免創建命令提示符窗口。
exec("start /b c:\\php\\php.exe -f sleep.php");
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.