function get_errcode($code){ $m_common_code = M('common_code'); $map['code'] = $code; $data = $m_common_code->where($map)->find(); $codes['errcode'] = $data['code']; $codes['errmsg'] = $data['value']; return $codes; }