jsonEncode($ret); } public function apiError($type, $msg,$param=array()) { $ret['code'] = $type; $ret['msg'] =trim($msg); $ret= array_merge($ret,$param); header('Content-Type:application/json; charset=utf-8'); return $this->jsonEncode($ret); } }