How do you run a .bat file from PHP?

Posted by undefined on Stack Overflow See other posts from Stack Overflow or by undefined
Published on 2009-05-07T17:17:00Z Indexed on 2010/03/29 11:03 UTC
Read the original article Hit count: 156

Filed under:
|
|
|

Can anyone tell me how to execute a .bat file from a PHP script?

I have tried - exec("C:[path to file]"); system("C:[path to file]");

nothing is working. Ive checked the PHP manuals and googled around but cant find a good answer. Anyone know where im going wrong?

I'm running windows 2003 server and have successfully manually ran the .bat file and it does what i need it to, I just need to be able to launch it programatically.

thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about .bat