/** * 关闭数据库连接 */ public function close() { if ($this->conn) { $this->conn->close(); $this->conn = null; } }