数据库重构

This commit is contained in:
thinkphp
2016-04-16 11:18:35 +08:00
parent a20a307e0a
commit 6886c03657
19 changed files with 3014 additions and 2801 deletions

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\\connector\\') . ucwords($options['type']);
self::$instances[$md5] = new $class($options);
// 记录初始化信息
APP_DEBUG && Log::record('[ DB ] INIT ' . $options['type'] . ':' . var_export($options, true), 'info');