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.
我的 Linux 安装上有两个站点:theming.dev xenforo.dev
在 theming.dev 上,在我的代码中,我有:
setcookie("mycookiename", "cookievalue", time()+3600, "", "xenforo.dev");
但是当我访问名为 xenforo.dev 的本地网站时,我没有名为“mycookiename”的 cookie,为什么?
注意:setcookie() 返回 true。
谢谢。
浏览器尊重同源策略,这可以防止网站在其他域名上设置 cookie。