add sub domain cookie support

This commit is contained in:
wlx 2014-06-12 15:10:00 +00:00
parent 85b17829c5
commit b789295fb4
1 changed files with 2 additions and 0 deletions

View File

@ -69,6 +69,8 @@ use Helpers\View as view;
if (!empty($phpSessId) && session_id() != $phpSessId) {
session_destroy();
session_id($phpSessId);
ini_set('session.cookie_domain', '.sanjiangyuan.org.cn' );
session_set_cookie_params(0, '/', '.sanjiangyuan.org.cn');
session_start();
}
// check if a user is logged in and has a valid role,