Session驱动的扩展定义方式改变 采用SessionHandler机制

Model类的架构方法 参数调整
This commit is contained in:
thinkphp
2013-04-09 21:29:32 +08:00
parent 279ce15d21
commit 15a45e9ff7
8 changed files with 75 additions and 53 deletions

View File

@@ -51,13 +51,7 @@ class Session {
if(!empty($config['type'])) { // 读取session驱动
$class = 'Think\\Session\\Driver\\'. ucwords(strtolower($config['type']));
// 检查驱动类
if(class_exists($class)) {
$hander = new $class();
$hander->execute();
}else {
// 类没有定义
E(L('_CLASS_NOT_EXIST_').': ' . $class);
}
session_set_save_handler(new $class());
}
// 启动session
if($config['auto_start']) session_start();