/** * 检查驱动是否可用 * @return boolean 是否可用 */ public function checkDriver() { if (!$this->isConnected && $this->reConnected < $this->maxReConnected) { try { if (isset($this->handler) && $this->handler->ping()) { $this->isConnected = true; } } catch (SSDBException $ex) { self::exception($ex); $this->connect(); } if (!$this->isConnected) { $this->reConnected++; } else { $this->reConnected = 0; } } return $this->isConnected; }