diff --git a/src/Core/Db.php b/src/Core/Db.php index 6934198..2117005 100644 --- a/src/Core/Db.php +++ b/src/Core/Db.php @@ -406,4 +406,14 @@ public function quote($string, $type = \PDO::PARAM_STR) return $this->getConnect()->quote($string, $type); } + /** + * 关闭数据连接 + */ + public function close() + { + foreach ($this->connections as $key => $conn) { + $this->connections[$key] = null; + unset($this->connections[$key]); + } + } }