php setcookie domain

前端 未结 4 1782
误落风尘
误落风尘 2020-12-14 08:14

Some application, not written by me, and not in PHP, creates a cookie for the domain \"www.domain.com\".

I am trying to replace that cookie. So in php I did:

4条回答
  •  天涯浪人
    2020-12-14 09:03

    Isn't this like a bug ? What if I want my cookies to just be at www.example.com and not at something.www.example.com ? e.g for performance. I should be able to specify cookie domain and NOT wildcard of all [sub][sub]subdomains. Not to mention the amount of bugs it causes, for example setting cookie by php and trying to remove it by JavaScript (which doesn't add the stupid dot).

提交回复
热议问题