cookie怎么跨域有效

WBOY
Release: 2016-06-13 13:52:41
Original
844 people have browsed it

cookie如何跨域有效?
http://blog.xxx.com/   和   http://www.xxx.com/blog/

请问如何让cookie都有效?
最近被这事搞的比较郁闷。

------解决方案--------------------
/
------解决方案--------------------
document.domain
------解决方案--------------------
这是COOKIE路径.而应该是COOKIE域.
------解决方案--------------------
使用数据库吧,用数据库模拟存储cookie。这个好像稍微好弄一些。

其他的方法……有点难?
------解决方案--------------------
加上域名:
'.xxx.com '

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!