homer.favenir Posted July 9, 2009 Share Posted July 9, 2009 hi, anyone knows how can i run a batch file from php and pass a parameter to that batch file. the approach is in the php the user will input the parameter, browse the batch file and submit. the batch file will open in cmd, with the parameter passes to it from php. after the batch file close, the php will ask a conditional question... i cant make the exec() or system() working anyone please. thanks Quote Link to comment Share on other sites More sharing options...
shergold Posted July 9, 2009 Share Posted July 9, 2009 you can use backticks to execute a command and open and start a batch file in php like so: echo `start C:\folder\file.bat`; If you need anymore help just ask and ill try, Shergold. Quote Link to comment Share on other sites More sharing options...
homer.favenir Posted July 9, 2009 Author Share Posted July 9, 2009 nope, it didnt work... ( Quote Link to comment Share on other sites More sharing options...
cunoodle2 Posted July 9, 2009 Share Posted July 9, 2009 did you check the error on line 37? Quote Link to comment Share on other sites More sharing options...
homer.favenir Posted July 9, 2009 Author Share Posted July 9, 2009 line 37? theres no error, only the page keep on loading again and again, but the batch file didnt executed Quote Link to comment 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.