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'])) {