根命名空间取消强制转小写 修正session驱动加载

This commit is contained in:
thinkphp
2016-01-12 14:17:48 +08:00
parent 47161ba7a6
commit f6adfc44f1
2 changed files with 2 additions and 3 deletions

View File

@@ -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];

View File

@@ -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();
}