protected function ihuyi($data) { $data = simplexml_load_string($data); $data = json_encode($data); $data = json_decode($data, false); $this->setMessage($data->msg); if (intval($data->code) == 2) { return true; } return false; }