方便使用session_id

This commit is contained in:
luofei614
2015-12-09 23:35:09 -05:00
parent c72aa08aff
commit 6ad5a19913
2 changed files with 4 additions and 3 deletions

View File

@@ -44,8 +44,6 @@ return [
'default_return_type' => 'html',
// 默认语言
'default_lang' => 'zh-cn',
// 是否使用session
'use_session' => true,
// 默认跳转页面对应的模板文件
'dispatch_jump_tmpl' => THINK_PATH . 'tpl/dispatch_jump.tpl',
@@ -80,8 +78,11 @@ return [
'prefix' => '',
'expire' => 0,
],
// 是否使用session
'use_session' => true,
'session' => [
'id' => '',
'prefix' => 'think',
'type' => '',
'auto_start' => true,

View File

@@ -39,7 +39,7 @@ class Session
if (isset($config['prefix'])) {
self::$prefix = $config['prefix'];
}
if (isset($config['id'])) {
if (isset($config['id']) && !empty($config['id'])) {
session_id($config['id']);
}
if (isset($config['name'])) {