db = \Zend_Registry::get('db'); }else{ $this->db = $db; } $this->config = \Zend_Registry::get('config'); $this->table = new Table(); } //登录测试 public function loginTest() { try { $client = new Client(); $url = $client->makeRequestCodeUrl("escience"); $curl = new Curl(); $curl->port = 443; $curl->initOptions(array('verifyssl' => false)); $data = $curl->request($url, array(), "POST"); $cache_data = $data; if (isset($data['headers']['http_code']) && $data['headers']['http_code'] == 302) { return true; } else { return false; } }catch (\Exception $e) { return false; } } }