开发者

Maintaining the session even after the browser is closed

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开发者_Go百科 so that the session data's can be accessed the next time the browser is used.

Thanks


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜