在PHP exec中使用变量 [英] Using variable in PHP exec

查看:185
本文介绍了在PHP exec中使用变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的PHP exec函数中使用变量:

I want to use my variables in my PHP exec function:

exec('ffmpeg -i $audio_input $audio_output');

正确的做法是什么? 我不想更改ffmpeg脚本.有可能吗?

What is the right way of doing this? I dont want to change the ffmpeg script. Is it possible?

谢谢

推荐答案

使用双引号代替单引号:

Use double quotes instead of single quotes:

exec("ffmpeg -i $audio_input $audio_output");

但是,请阅读以下页面: http://php. net/manual/en/language.types.string.php

But please, go read this page: http://php.net/manual/en/language.types.string.php

这篇关于在PHP exec中使用变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆