[英]PHP: shell_exec Permissions on Windows Server
我有以下问题:如果我在Windows Server 2012上通过Shell(cmd.exe)执行Shell-Paramter,它会完美执行。 但是,如果我通过PHP(shell_exec)进行相同操作,则会执行,但无法访问模板文件。
aerender错误:找不到具有给定名称的渲染设置模板。
这是代码
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使用绝对路径,即。 C:\\aerender\\aerender
好的,现在可以了! 我只是将Windows中的apache2服务更改为以管理员身份运行
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.