From 6a2fda25de26ca7de70b85b93a160f1a3ac269ac Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 9 Aug 2016 12:16:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BConnection=E7=B1=BB=E7=9A=84c?= =?UTF-8?q?onnect=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base.php | 2 +- library/think/db/Connection.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/base.php b/base.php index 1af1e329..28de4b51 100644 --- a/base.php +++ b/base.php @@ -57,5 +57,5 @@ if (is_file(ROOT_PATH . 'env' . EXT)) { // 注册错误和异常处理机制 \think\Error::register(); -// 加载模式配置文件 +// 加载惯例配置文件 \think\Config::set(include THINK_PATH . 'convention' . EXT); diff --git a/library/think/db/Connection.php b/library/think/db/Connection.php index 6c2a0ce0..767c0191 100644 --- a/library/think/db/Connection.php +++ b/library/think/db/Connection.php @@ -255,6 +255,8 @@ abstract class Connection if (!isset($this->links[$linkNum])) { if (!$config) { $config = $this->config; + } else { + $config = array_merge($this->config, $config); } // 连接参数 if (isset($config['params']) && is_array($config['params'])) {