作品:
shell_exec('c:python27python.exe command.py');
在外壳中工作:
python.exe command.py
不起作用:
shell_exec('python.exe command.py');
操作系统是Windows 7。这适用于 debian 和其他 Windows 7 计算机,但在我的计算机上则不然。可能是什么原因?
从用户帐户运行命令行时python
路径是在路径变量中设置的。
如果它不起作用,则意味着webserver user
没有设置它。 检查此线程 如何设置变量 Apache 2 PATH
.