PHP永久cookie [英] PHP permanent cookie

查看:396
本文介绍了PHP永久cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置即使用户关闭浏览器或停止其计算机也不会永不过期的Cookie?

How do I set up a cookie that won't never expire, even when the user closes his browser or stops his machine?

谢谢!

推荐答案

我不认为有一种方法有一个永久的cookie,而是一个到期非常遥远的未来。只是因为您下次返回或关闭浏览器后仍然登录网站/服务,并不意味着Cookie上没有过期日期。

I don't think there is a way to have a 'permanent' cookie, but rather one that expires very very far into the future. Just because you remained logged into a website/service the next time you return or after you close your browser, does not mean that there is no expiration date on the cookie.

请参阅关于设置Cookie生命周期的PHP文档

这篇关于PHP永久cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆