php setcookie domain

前端 未结 4 1790
误落风尘
误落风尘 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 08:40

    If you specify a domain, you should follow RFC 2109 and prefix the domain with a dot; otherwise the client will do that. But if you don’t specify a domain at all, the client will take the domain of the request.

提交回复
热议问题