Posts Tagged ‘’

警惕php setcookie作用域里的规范

星期六, 03月 22nd, 2008

这里写的很清楚,cn域名没在内

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”.

详细文档:http://wp.netscape.com/newsref/std/cookie_spec.html

解决办法:用javascript写cookie