How to run a batch file using PHP? [message #179322] |
Thu, 04 October 2012 04:17 |
Fastian
Messages: 20 Registered: June 2012
Karma:
|
Junior Member |
|
|
I am trying to run a batch file using exec function in PHP. The program statement executes without any error but nothing happen and batch file is not executed.
The batch file is v.simple with just two commands.This batch file runs fine when I run directly from cmd.But when I use exec function from my PHP page, I am unable to run this batch file. I am not interested in the output returned by exec( ) function's argument . I am just interested in the complete execution of the batch file.
I have also tried using the exec() in following way but not successful:
exec("c:\\windows\\system32\\cmd.exe /c $batchFileToRun");
Is there any option available better than exec()?
Can anyone help me?
|
|
|