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

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

WBOY
Release: 2016-06-13 12:48:49
Original
826 people have browsed it

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


------解决方案--------------------
$return_var如果是0,才说明命令成功执行了。
------解决方案--------------------
那个 & 表示在后台执行,返回的只是是否成功的放入了后台
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template