I am trying to have a PHP file call a Windows batch script using
exec("runPy.bat");
I have also tried
exec("cmd /c \\\\server\\somePath\\runPy.bat");
It doesn't matter what I try, the batch script doesn't work. And I don't get any errors. After much research I found a post saying that the problem may be due to privaleges: https://stackoverflow.com/a/11613662
Can anyone show me safe/proper way to set up permissions so that I can call batch scripts in IIS? Or is it unsafe in general to do that? Using IIS8 if that helps.
要运行批处理,您需要使用cmd
,可以通过以下cmd
调用:
system("cmd /c C:[path to file]");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.