Hi there,
I'm trying to see if a browser + PHP can be used as a front-end to launch applications on a desktop regardless if you are on Windows, Linux, or Unix. Though, I can't grasp the differences or true purposes of exec and system. Can you help me?
For test case #1, I tried using exec() to run a .bat file which then launches the application, but I get no server response. The .bat file is never executed.
For test case #2, I tried using system(), and the .bat file successfully runs which in turn runs all the other applications (GUI and whatnot), but then browser seems to just sit there waiting to provide a response that never comes.
From what I gather, exec & system functions will not finish executing until the files they have called have done so. I would just like to have PHP launch an application on the desktop, not wait for anything to output, and go on its merry way. I don't want to have any dependancies on the web server either as I'm using Sun's Java Web Server.
Is what I am trying to accomplish possible?
The code is fairly simple:
For exec
<?php
exec(start batFile.bat);
?>
<?php
system(start batFile.bat);
?>
Thanks!
Hiji