簡體   English   中英

在窗戶上沒有,執行官沒有等待完成

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM