PHP setcookie() for domain but NOT subdomains

后端 未结 4 886
盖世英雄少女心
盖世英雄少女心 2020-12-30 08:46

Is there any way to set a cookie that is not readable on subdomains? In other words, have the cookie available on domain.com, but not

4条回答
  •  一生所求
    2020-12-30 09:01

    It is not possible as the cookie domain is tail matched against the domain name. You will have to go with www.

提交回复
热议问题