Fatal error: Can't use function return value in write context in

php 报错:

Fatal error: Can’t use function return value in write context in

找到对应的报错为位置

if( empty( shell_exec("which $command") ) ) {
    return false;
}

“empty” function can be used only for variables and if you pass anything else, it will throw a parse error。

$var  = shell_exec("which $command") ;
 if( empty( $var ) ) {
    return false;
}

你可能感兴趣的:(PHP)