Home  >  Article  >  Backend Development  >  关于exec函数的返回值有关问题

关于exec函数的返回值有关问题

WBOY
WBOYOriginal
2016-06-13 12:48:49759browse

关于exec函数的返回值问题
exec函数原型:
string exec ( string $command [, array &$output [, int &$return_var ]] )
为什么只要在$command末尾加个"&",$return_var就总为0呀


------解决方案--------------------
$return_var如果是0,才说明命令成功执行了。
------解决方案--------------------
那个 & 表示在后台执行,返回的只是是否成功的放入了后台
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn