mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
根命名空间取消强制转小写 修正session驱动加载
This commit is contained in:
@@ -37,7 +37,6 @@ class Loader
|
||||
} else {
|
||||
// 命名空间自动加载
|
||||
list($name, $class) = explode('\\', $class, 2);
|
||||
$name = strtolower($name);
|
||||
if (isset(self::$namespace[$name])) {
|
||||
// 注册的命名空间
|
||||
$path = self::$namespace[$name];
|
||||
|
||||
@@ -69,14 +69,14 @@ class Session
|
||||
}
|
||||
if (!empty($config['type'])) {
|
||||
// 读取session驱动
|
||||
$class = (!empty($config['namespace']) ? $config['namespace'] : '\\think\\session\\driver\\') . strtolower($config['type']);
|
||||
$class = (!empty($config['namespace']) ? $config['namespace'] : '\\think\\session\\driver\\') . ucwords($config['type']);
|
||||
// 检查驱动类
|
||||
if (!session_set_save_handler(new $class())) {
|
||||
throw new Exception('error session handler', 11700);
|
||||
}
|
||||
}
|
||||
// 启动session
|
||||
if (!empty($config['auto_start']) && PHP_SESSION_ACTIVE!=session_status()) {
|
||||
if (!empty($config['auto_start']) && PHP_SESSION_ACTIVE != session_status()) {
|
||||
ini_set('session.auto_start', 0);
|
||||
session_start();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user