session_set_cookie_params——path

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


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值