Posts Tagged ‘PHP’

警惕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

PHP Class 变量封装生成器

星期六, 03月 15th, 2008

不记得去年什么时候写的,最近用到,发现还能用,没什么技术含量的javascript代码
http://liuyami.com/labs/setget.html