【发布时间】:2014-05-30 09:24:35
【问题描述】:
在我的 php 文件中,我正在尝试执行一个 shell 命令。我能够在终端中运行命令变量值就好了。但不知何故,shell_exec 并没有为我做这件事。
$command = 'jpegoptim '.$imgpath;
shell_exec($command);
看起来 'git status' 在这里甚至不起作用
$output = shell_exec('git status');
更新:终于报错了
sh: jpegoptim: 找不到命令
【问题讨论】:
标签: php shell terminal image-optimization