/** * 析构函数 */ public function __destruct() { if (!self::$autocommit) { $this->handler->rollback(); $this->handler->autocommit(true); } }