php cookie cn域名规范
来源:互联网 发布:软件过程管理体系论文 编辑:程序博客网 时间:2024/04/30 13:23
以前真没在意cookie的作用域问题,可能以前用.com域名没出过问题,今天用公司的一个cn域名测试,怎么也不能实现cookie共享,后来采用js设置cookie,在另外一台服务器上共享cookie成功,真叫气人!翻阅了一下php的cookie 规范 ,里面有这么一段
Only hosts within the specified domain can set a cookie for a domain and domains must have at least two (2) or three (3) periods in them to prevent domains of the form: ".com", ".edu", and "va.us". Any domain that fails within one of the seven special top level domains listed below only require two periods. Any other domain requires at least three. The seven special top level domains are: "COM", "EDU", "NET", "ORG", "GOV", "MIL", and "INT".
看出来了吧,真他娘的草蛋!除了"COM", "EDU", "NET", "ORG", "GOV", "MIL", and "INT"这几个后缀的域名可以设置二级作用域,其他的域名至少三级才可以,也就是说想通过设置作用域为b.cn来实现a.b.cn和c.b.cn下的 cookie共享用php是不行的,php只能实现作用域b.a.cn下的d.b.a.cn和e.b.a.cn间的cookie共享,希望大家注意,再遇到此类问题,别浪费时间拼命的测试了……
Only hosts within the specified domain can set a cookie for a domain and domains must have at least two (2) or three (3) periods in them to prevent domains of the form: ".com", ".edu", and "va.us". Any domain that fails within one of the seven special top level domains listed below only require two periods. Any other domain requires at least three. The seven special top level domains are: "COM", "EDU", "NET", "ORG", "GOV", "MIL", and "INT".
看出来了吧,真他娘的草蛋!除了"COM", "EDU", "NET", "ORG", "GOV", "MIL", and "INT"这几个后缀的域名可以设置二级作用域,其他的域名至少三级才可以,也就是说想通过设置作用域为b.cn来实现a.b.cn和c.b.cn下的 cookie共享用php是不行的,php只能实现作用域b.a.cn下的d.b.a.cn和e.b.a.cn间的cookie共享,希望大家注意,再遇到此类问题,别浪费时间拼命的测试了……
- php cookie cn域名规范
- 【php】域名与cookie
- PHP实现跨域名Cookie
- 实现跨域名Cookie (转) (PHP)
- 腾讯屏蔽.CN域名
- GAE绑定CN域名
- 废除CN域名
- GAE绑定CN域名
- Cookie 规范
- Cookie规范
- cn域名为什么要降价
- xmucmd.cn域名到期了
- 百度对CN域名看法
- CN域名叫卖30万
- hqu.edu.cn域名测试
- com域名和cn域名net域名的区别是什么
- 实现跨域名 Cookie
- 实现跨域名Cookie
- 选择php的理由
- ASP.NET入门教程(经典)
- 老话题:ClientAbortException:socket write error
- 生气啦
- HTTP协议的头信息详解
- php cookie cn域名规范
- SQL 左外连接,右外连接,全连接,内连接
- 妈妈回来了20080319
- Oracle9i安装、升级、卸载和使用(Windows)
- 我吃酒了
- sql语句中日期时间格式化查询
- JAVASCRIPT - - 面向对象编程
- 双CPU加电后由谁来执行代码
- Oracle10g安装、升级、卸载和使用(Unix)