i'm having a very weird session problem under php: (works perfectly locally but not on my internet-server)
the problem:
there's no unset or anything which might reset/clear the session. i'm using a global php include for the header which triggers session_start();
any ideas? thanks
Try setting your cookie parameters to allow the domain to work across subdomains:
$params = session_get_cookie_params();
session_set_cookie_params($params['lifetime'], $params['path'], '.example.org');
Where example.org is your domain name.
Then before printing anything to screen start your session :
session_start();
On every page/resource you wish to be able access session data.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.