> Hi all im new to PHP and im trying to let a process (*.exe file) to run in
> background(localhost) and let php continue processing the script. But PHP
> always stops and wait for the (*.exe) stops/close!
> 
> Anyone here can help me by giving me an simply example to let PHP run the
> exe file and continue with code execution.


check out http://us2.php.net/manual/en/function.exec.php
read through the user comments
found this on php.net

function execInBackground($path, $exe, $args = "") {
   global $conf;
  
   if (file_exists($path . $exe)) {
       chdir($path);
       if (substr(php_uname(), 0, 7) == "Windows"){
           pclose(popen("start \"bla\" \"" . $exe . "\" " .
escapeshellarg($args), "r"));
       } else {
           exec("./" . $exe . " " . escapeshellarg($args) . " >
/dev/null &");
       }
   }
}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to