【发布时间】:2017-10-27 08:47:57
【问题描述】:
我在 PHP 中得到一个 shell 命令的输出
$str = shell_exec("command");
并在终端中运行 PHP 脚本。当shell command 返回错误时,将打印在终端上。如何告诉shell_exec 只返回命令输出而不返回任何错误输出?
【问题讨论】:
-
your own question 可能重复? :)
标签: php error-handling shell-exec