session失效修复

feat/task1-c-wallet
gongfuxiang 2024-04-17 13:52:43 +08:00
parent 96fd60e428
commit 69a2ef5149
1 changed files with 2 additions and 0 deletions

View File

@ -126,6 +126,7 @@ function DefaultTheme($theme = null)
{ {
if(session_status() != 2) if(session_status() != 2)
{ {
ini_set('session.cookie_domain', MyFileConfig('common_cookie_domain', '', '', true));
session_start(); session_start();
} }
if(empty($_SESSION[$key])) if(empty($_SESSION[$key]))
@ -146,6 +147,7 @@ function DefaultTheme($theme = null)
{ {
if(session_status() != 2) if(session_status() != 2)
{ {
ini_set('session.cookie_domain', MyFileConfig('common_cookie_domain', '', '', true));
session_start(); session_start();
} }
$_SESSION[$key] = empty($theme) ? $params[$key] : $theme; $_SESSION[$key] = empty($theme) ? $params[$key] : $theme;