void session_set_cookie_params( int $lifetime [, string $path [, string $domain [, bool $secure = false [, bool $httponly = false ]]]] )
ifetime
Lifetime of the session cookie, defined in seconds.
path
网站Cookie作用路径
Path on the domain where the cookie will work. (cookie工作的域名路径)Use a single slash ('/') for all paths on the domain.(这里的意思大概是,用“/”表示是在下面domain参数下所有目录,二级域名用到)
domain
网站Cookie作用域
Cookie domain, for example 'www.php.net'. To make cookies visible on all subdomains then the domain must be prefixed with a dot like '.php.net'.
secure
If TRUE cookie will only be sent over secure connections.
httponly
If set to TRUE then PHP will attempt to send the httponly flag when setting the session cookie.
string $path 用于指定对应的Session的有效范围,默认值为/,即在当前域内都有效(http://hi.baidu.com/you5a_com/blog/item/efb7c2194ffd36138718bf04.html)