即使浏览器关闭后仍保持会话

发布于 2024-09-03 01:28:43 字数 146 浏览 2 评论 0原文

任何人都可以告诉如何维护会话(在 PHP 中),以便会话内容得以保留,并且即使在浏览器重新启动后也可以访问。

一般来说,会话​​会随着浏览器的关闭而过期,但我希望会话不要关闭,以便下次使用浏览器时可以访问会话数据。

谢谢

Could anyone tell how to maintain a session (in PHP) so that the session contains are preserved and are accessible even after the browser is restarted.

In general a session expires with the closing of a browser, but I want the session NOT TO BE CLOSED so that the session data's can be accessed the next time the browser is used.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

计㈡愣 2024-09-10 01:28:43

有一个非常好的教程,介绍如何将会话内容保存到数据库
唯一需要做的就是用保存的数据重新填充新会话 - 就这样。

There is a really good tutorial on howto save session contents to a database.
The only thing needed is to refill a new session with the saved data - there you go.

糖粟与秋泊 2024-09-10 01:28:43

将会话数据存储在数据库中的某个位置,并将会话 ID 保存在加密的持久性仅 HTTP cookie 中。

Store session data somewhere in a DB and keep session ID in an encrypted persistent HTTP-only cookie.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文