PHP:shell_exec 在 Windows 服务器上的权限

PHP: shell_exec Permissions on Windows Server

我遇到以下问题:如果我在 [=29 上通过 Shell (cmd.exe) 执行 Shell-Paramter =] Server 2012 它执行得很好。但是如果我通过 PHP (shell_exec) 执行相同的操作,它会执行,但无法访问模板文件。

aerender ERROR: No render settings template was found with the given name.

这是代码

PHP:

<?php
chdir('C:\Program Files\Adobe\Adobe After Effects CC 2015\Support Files\');
shell_exec('aerender -project C:\server\htdocs\ae\final3\final.aep 
-comp "clouds-   rotation-low" -RStemplate "E2Z640blur" 
-OMtemplate "E2Z640" -output C:\server\htdocs\cache\clouds-rotation-low.avi')  
?>

是的,发生这种情况是因为当 PHP 打开 cmd 时它不会按标准加载 PATH 变量,我认为有办法解决这个问题,或者您可以为 aerender 使用绝对路径 IE。 C:\aerender\aerender

好的,现在可以了!我刚刚将 Windows 中的 apache2 服务更改为 运行 作为管理员