我正在编写这个简单的命令来执行 ffmpeg,但 shell_exec 没有给出任何结果。否则它会用 ls 给出结果。
这是我的代码
{
<html>
<body>
<?php
$output = shell_exec('ffmpeg -version');
echo "<pre>$output</pre>";
?>
</body>
</html>
}
最佳答案
如果您将 PHP 与 WAMP 服务器一起使用,请在下面检查以在 php 中启用 shell_exec
Enable shell_exec() in wamp server
关于shell exec命令没有运行ffmpeg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24944375/