为什么shell_exec看不到路径环境变量



作品:

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 .

最新更新