homer.favenir Posted June 23, 2009 Share Posted June 23, 2009 hi to all, i would like to ask how can i run an external program like .exe using php? and how can a php know that the program has been closed. thanks Quote Link to comment https://forums.phpfreaks.com/topic/163318-run-an-executable-program/ Share on other sites More sharing options...
RussellReal Posted June 23, 2009 Share Posted June 23, 2009 com objects, or exec.. but exec won't actually load up any api it will start the program and see wat happens lol Quote Link to comment https://forums.phpfreaks.com/topic/163318-run-an-executable-program/#findComment-861682 Share on other sites More sharing options...
homer.favenir Posted June 23, 2009 Author Share Posted June 23, 2009 ok but my script wont work, is this the right way to use it? <?php echo '<pre>'; echo exec('C:\Program Files\Hasbro\Monopoly by Parker Brothers\MonopolyPB.exe') or die("It doesn't work"); echo '</pre>'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/163318-run-an-executable-program/#findComment-861687 Share on other sites More sharing options...
RussellReal Posted June 23, 2009 Share Posted June 23, 2009 it will execute the file.. uhm.. it won't load GUI or interface.. not API sorry that was the wrong acronym Quote Link to comment https://forums.phpfreaks.com/topic/163318-run-an-executable-program/#findComment-861692 Share on other sites More sharing options...
homer.favenir Posted June 23, 2009 Author Share Posted June 23, 2009 how to use the exec() properly? supposed i want to execute the notepad. how can i do it? please help thanks Quote Link to comment https://forums.phpfreaks.com/topic/163318-run-an-executable-program/#findComment-861696 Share on other sites More sharing options...
MasterACE14 Posted June 23, 2009 Share Posted June 23, 2009 read that part of the manual... http://au2.php.net/manual/en/function.exec.php Quote Link to comment https://forums.phpfreaks.com/topic/163318-run-an-executable-program/#findComment-861796 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.