今天我开始了一个项目,它将分析我拥有的曲目,并为mysql表中的每首歌曲添加一个BPM标签。一切都很顺利,直到我正在完成我的完成步骤: shell_exec-ing我在ubuntu中的命令...
$command='/usr/bin/bpm-tag -f -n "/var/www/website/music/music.mp3"';
echo shell_exec($command);
这是我的命令/代码并且它不起作用...(它没有输出任何东西,当我使用putty运行相同的命令时,我得到了我需要的东西......)
$output= shell_exec('whoami');
print_r($output);
输出:
www-data