master
ELF 4 years ago
parent 773068b57c
commit 289783eecd

@ -103,6 +103,7 @@ return array(
/* SESSION 和 COOKIE 配置 */ /* SESSION 和 COOKIE 配置 */
'SESSION_PREFIX' => 'onethink_admin', //session前缀 'SESSION_PREFIX' => 'onethink_admin', //session前缀
'SESSION_COOKIE_PATH' => '/admin.php',
'COOKIE_PREFIX' => 'onethink_admin_', // Cookie前缀 避免冲突 'COOKIE_PREFIX' => 'onethink_admin_', // Cookie前缀 避免冲突
'VAR_SESSION_ID' => 'session_id', //修复uploadify插件无法传递session_id的bug 'VAR_SESSION_ID' => 'session_id', //修复uploadify插件无法传递session_id的bug

@ -70,6 +70,7 @@ return array(
/* SESSION 和 COOKIE 配置 */ /* SESSION 和 COOKIE 配置 */
'SESSION_PREFIX' => 'onethink_home', //session前缀 'SESSION_PREFIX' => 'onethink_home', //session前缀
'SESSION_COOKIE_PATH' => '/index.php',
'COOKIE_PREFIX' => 'onethink_home_', // Cookie前缀 避免冲突 'COOKIE_PREFIX' => 'onethink_home_', // Cookie前缀 避免冲突

@ -1243,6 +1243,9 @@ function session($name='',$value='') {
if(isset($name['name'])) session_name($name['name']); if(isset($name['name'])) session_name($name['name']);
if(isset($name['path'])) session_save_path($name['path']); if(isset($name['path'])) session_save_path($name['path']);
if(isset($name['domain'])) ini_set('session.cookie_domain', $name['domain']); if(isset($name['domain'])) ini_set('session.cookie_domain', $name['domain']);
if (C('SESSION_COOKIE_PATH')) {
ini_set('session.cookie_path', C('SESSION_COOKIE_PATH'));
}
if(isset($name['expire'])) { if(isset($name['expire'])) {
ini_set('session.gc_maxlifetime', $name['expire']); ini_set('session.gc_maxlifetime', $name['expire']);
ini_set('session.cookie_lifetime', 99999999); ini_set('session.cookie_lifetime', 99999999);

Loading…
Cancel
Save