【发布时间】:2015-07-07 12:04:17
【问题描述】:
关于此代码
public function invoke($url)
{
exec('wget 2>&1', $output);
print_r($output);
}
2>&1 在这个命令中做了什么?我在 SO 上找到了这个,但没有解释 2>&1
wget 是一个 linux 命令,我使用 exec() 从 PHP 运行它。
上面的代码有效。我只需要在正确的位置插入$url并理解2>&1。
相关链接
【问题讨论】: