cookies的问题。

WBOY
Release: 2016-06-23 14:03:38
Original
1027 people have browsed it

同样的设置方法。。
360chrome,能反复登录退出。
在IE8反复登录就不行,反复登录第三次,浏览器就不记录cookie了。
请问这个该怎么弄?


回复讨论(解决方案)

如果仅在 IE8 中出问题,那就不可能在 php 层面解决

如果仅在 IE8 中出问题,那就不可能在 php 层面解决

discuz就没这个问题。。

建议还是贴出代码让大家测试下

login:
setcookie('uid', $dzid, $cookietime, '/', '.xxxx.net', 0);
setcookie('upd', $pass, $cookietime, '/', '.xxxx.net', 0);

logout:
setcookie('uid', '', $time - 3600, '/', '.xxxx.net', 0);
setcookie('upd', '', $time - 3600, '/', '.xxxx.net', 0);

在360Chrome可以反复登录。
IE就不行,反复登录最多2次,就不会再保存cookie了。
必须要关闭IE重新开启才行,我用的IE8测试的。

discuz也是用的setcookie嘛,就没问题。
虽然外面封装了一层dsetcookie,但貌似关系不大吧。

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!