PHP cookie 在IE8停正常,火狐,chrome等不正常

WBOY
Release: 2016-06-13 11:30:02
Original
860 people have browsed it

PHP cookie 在IE8下正常,火狐,chrome等不正常
就是执行到以下代码的时候出的问题:
if ($remember=="checked") {     //下次自动登录
 Cookie::set('authcookie', authcode("$user[user_name]\t$user[user_id]\t1",'ENCODE'), 31536000);
} else {                        //不自动登录
Cookie::set('authcookie', authcode("$user[user_name]\t$user[user_id]\t0",'ENCODE'),);
}

具体情况如下:
1.自动登录,所有浏览器都正常,cookie都有发送
2.不自动登录,只有IE内核浏览器正常,chrome和火狐发送的head中都没有authcookie
3.domain如果为IP,所有浏览器都正常,domain为域名,出现第2个问题.
完全不理解为什么。。。。。
是和数据库有关系?上面的user变量是数据库的一个表

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