1 min read
How to execute batch file via PHP?
The main issue was of
path
and permission
. I have gotten my batch file to execute.
Here is my solution:
-
I run my batch file from the same folder the php file is in.
exec("mybatch.bat");
-
I make sure that Apache Service has enough permission to run the batch file. Just to test i used an administrator account for Apache to log on with.