mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进Db类的强制重连
This commit is contained in:
@@ -82,10 +82,9 @@ class Db
|
|||||||
Log::record('[ DB ] INIT ' . $options['type'], 'info');
|
Log::record('[ DB ] INIT ' . $options['type'], 'info');
|
||||||
}
|
}
|
||||||
if (true === $name) {
|
if (true === $name) {
|
||||||
return new $class($options);
|
$name = md5(serialize($config));
|
||||||
} else {
|
|
||||||
self::$instance[$name] = new $class($options);
|
|
||||||
}
|
}
|
||||||
|
self::$instance[$name] = new $class($options);
|
||||||
}
|
}
|
||||||
return self::$instance[$name];
|
return self::$instance[$name];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user