php調用system或exec怎樣立即返回?
$WshShell = new COM("WScript.Shell"); $oExec = $WshShell->Run("notepad.exe", 7, false); 或者 if (substr(php_uname(), 0, 7) == "Windows"){ pclose(popen("start /B ". $cmd, "r")); } else { exec($cmd . " > /dev/null &"); }
php調用system或exec怎樣立即返回?
$WshShell = new COM("WScript.Shell"); $oExec = $WshShell->Run("notepad.exe", 7, false); 或者 if (substr(php_uname(), 0, 7) == "Windows"){ pclose(popen("start /B ". $cmd, "r")); } else { exec($cmd . " > /dev/null &"); }