• Archivo

php execute in background and get pid (process id) in windows wamp

Running a process in background in windows using php was not as easy as i expected,

there is very few information about it on the web ,  all i could find was how to launch the process in background in windows but not how to get the PID

and its realy simple,  so here it is the code :

$WshShell = new COM(“WScript.Shell”);
$oExec = $WshShell->Exec( $exe );
echo $oExec->ProcessID;

Previous Post

Leave a Reply

Your email address will not be published. Required fields are marked *