note 94961 modified in function.session-set-cookie-params by danbrown
| From: | danbrown@php.net | Date: | Fri, 04 Dec 2009 18:29:53 +0000 |
| Subject: | note 94961 modified in function.session-set-cookie-params by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-163589@lists.php.net to get a copy of this message | ||
REMEMBER, that if you have a multi-subdomain site, you must put the following to enable a session id
on the whole website:
<?php
session_set_cookie_params(0, '/', '.example.com');
session_start();
?>
Otherwise, you'll have 2 diffrent sessions on e.g. news.example.com and download.example.com
--was--
REMEMBER, that if you have a multi-subdomain site, you must put the following to enable a session id
on the whole website:
<?php
session_set_cookie_params(0, '/', '.my-page.com');
session_start();
?>
Otherwise, you'll have 2 diffrent sessions on e.g. news.my-page.com and download.my-page.com
http://php.net/manual/en/function.session-set-cookie-params.php