This commit is contained in:
thinkphp
2016-01-21 18:41:09 +08:00
parent e006d40bdd
commit 82ed2a8729

View File

@@ -41,7 +41,7 @@ class Db
if (empty($options['type'])) {
throw new Exception('db type error');
}
$class = !empty($options['namespace']) ? $options['namespace'] : '\\think\\db\\driver\\') . ucwords($options['type'];
$class = (!empty($options['namespace']) ? $options['namespace'] : '\\think\\db\\driver\\') . ucwords($options['type']);
self::$instances[$md5] = new $class($options);
}
self::$instance = self::$instances[$md5];