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 从子域设置到域,并且必须读取它们,我该怎么做?
示例: sub1.domain.com -> domain.com
谢谢
用作.domain.com您的域(注意前面的点domain.com)。这样,cookie 可用于所有其他子域,包括www子域。
.domain.com
domain.com
www
在此处了解更多信息:http: //www.w3schools.com/php/func_http_setcookie.asp