Lamez Posted June 19, 2007 Share Posted June 19, 2007 I have been playing around with PHP and learning a lot, and learned how it makes web designing easier when you are dealing with multi-pages. I was wondering is there a way I could trigger a batch file with a PHP file? I have uploaded a batch file to my webhost, and I want to turn it on, but can I do this by using a PHP file? I have heard it can be done, but how? -Thanks, James Little Quote Link to comment https://forums.phpfreaks.com/topic/56256-triggering-batch-files/ Share on other sites More sharing options...
Lamez Posted June 20, 2007 Author Share Posted June 20, 2007 any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/56256-triggering-batch-files/#findComment-278092 Share on other sites More sharing options...
neel_basu Posted June 20, 2007 Share Posted June 20, 2007 Use the exec() Function exec('the_batch_file_name.bat') Quote Link to comment https://forums.phpfreaks.com/topic/56256-triggering-batch-files/#findComment-278229 Share on other sites More sharing options...
Lamez Posted June 20, 2007 Author Share Posted June 20, 2007 Thank you very much!v Quote Link to comment https://forums.phpfreaks.com/topic/56256-triggering-batch-files/#findComment-278639 Share on other sites More sharing options...
Lamez Posted June 20, 2007 Author Share Posted June 20, 2007 Wait this did not work here is my php file: http://krazyscape.lamezz.com/run.php what did I do wrong? Quote Link to comment https://forums.phpfreaks.com/topic/56256-triggering-batch-files/#findComment-278654 Share on other sites More sharing options...
Rojay Posted June 20, 2007 Share Posted June 20, 2007 hmm is your server also running the same OS as you are? Quote Link to comment https://forums.phpfreaks.com/topic/56256-triggering-batch-files/#findComment-278706 Share on other sites More sharing options...
neel_basu Posted June 21, 2007 Share Posted June 21, 2007 exe files can only run in Windows (Micro****** Platform). and I think linux is Running on your Server. Quote Link to comment https://forums.phpfreaks.com/topic/56256-triggering-batch-files/#findComment-279052 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.