我想在我的 PHP exec 函数中使用我的变量:
exec('ffmpeg -i $audio_input $audio_output');
这样做的正确方法是什么?我不想更改 ffmpeg 脚本。是否可以?
谢谢
使用双引号而不是单引号:
exec("ffmpeg -i $audio_input $audio_output");
但是,请阅读此页面: http: //php.net/manual/en/language.types.string.php
使用前面提到的双引号或
exec('ffmpeg -i '.$audio_input.' '.$audio_output);