src/Core/FrameBase.php
function result($status = 1, $message = '', $json_encode = false)
    {
        $result = array('status' => $status, 'message' => $message);
        if ($json_encode) {
            if (($result = json_encode($result)) === false) {
                throw new CoreException('json encode fail');
            }
        }

        return $result;
    }
function result($status = 1, $message = '', $json_encode = false)
    {
        $result = array('status' => $status, 'message' => $message);
        if ($json_encode) {
            if (($result = json_encode($result)) === false) {
                throw new CoreException('json encode fail');
            }
        }

        return $result;
    }
返回一个数组或JSON字符串

@param int $status
@param string|array $message
@param bool $json_encode
@return array|string
@throws CoreException