且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP shell_exec()与exec()

更新时间:2022-05-28 01:38:20

shell_exec返回所有输出流作为字符串. exec默认情况下返回输出的最后一行,但可以将所有输出作为指定为第二个参数的数组提供.

shell_exec returns all of the output stream as a string. exec returns the last line of the output by default, but can provide all output as an array specifed as the second parameter.

请参见

  • http://php.net/manual/en/function.shell-exec.php
  • http://php.net/manual/en/function.exec.php