PHP下不接受cookie的问题解决


写一个测试的脚本,发现不知道为什么IE下死活都设置不上cookie,而firefox完全正常。
之后在我个人的几个站点下发现该部分脚本是正确的。检查之后发现只有测试用的主机名不行,再仔细回想一下,终于找到原因:
正确的域名是不带下划线“_”的,而我使用的测试主机名带了下划线,因此在IE下,认为是非法的,从而无法设置COOKIE,而在这方面firefox没有相应的限制。

最后,我将主机名改为一个不带下划线的,就完全正常了。


感谢您的关注。您现在可以 留言(0)留下通告地址



Leave a Reply

Note: Any comments are permitted only because the site owner is letting you post, and any comments will be removed for any reason at the absolute discretion of the site owner.

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image