问题
I want multiple PHP processes to run in the background without disturbing the user. This is the code I have:
exec("psexec -d php peak.php map/eline/updatedotrange first=$first last=$last filename=$filename > NUL 2> NUL");
But for every exec statement, a new CMD pops up. This kinda ruins it for me when I'm looping 100 times and running that line.
Any way I can get the process to run in the background, without the user noticing?
回答1:
I solved it using bgrun.exe
http://www.jukkis.net/bgrun/
If anyone knows a 100% native Windows way to do this I'd die to know
来源:https://stackoverflow.com/questions/6048299/how-do-i-start-a-new-instance-of-php-in-windows-without-it-opening-a-new-cmd-win