[英]Expiration time in php cookie doesn't work
I have a declaration like this: 我有这样的声明:
setcookie("cookieName", "cookieValue", time() + (3600 * 24 * 2));
When I take a look on Google Chrome the Expiration time its 30 minutes ago! 当我看一下Google Chrome浏览器时,其到期时间为30分钟! And in Firefox its now + 30 minutes...
在Firefox中,现在+ 30分钟...
I can't understand this weird behaviour. 我无法理解这种奇怪的行为。
Someone can help me please? 有人可以帮我吗?
Thanks a lot 非常感谢
Sorry, its my fault. 对不起,是我的错。
I haven't see that setcookie is called after headers have been sent. 我还没有看到在发送标头之后调用setcookie的情况。
Thanks! 谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.