Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我设置了这个 cookie 之后,它就不起作用了。当我离开域部分并在 localhost 上对其进行测试时,我可以回显 cookie:
setcookie("email",$email,0, "/", ".domainname.com");
如果你想测试localhost,比做域localhost。
localhost
您不会期望将其设置google.com为允许您设置 cookie 对google.com吧?
google.com