Home  >  Article  >  Backend Development  >  thinkphp3.2

thinkphp3.2

WBOY
WBOYOriginal
2016-10-22 00:14:23891browse

Why is the browser closed and the session and cookies cleared?
I don’t know what the problem is. The browser has been closed and both are gone

Reply content:

Why is the browser closed and the session and cookies cleared?
I don’t know what the problem is. The browser has been closed and both are gone

The default cookie life cycle is during the browser session, and the cookie expiration time can be set
http://blog.sina.com.cn/s/blo...

Cookies will not be cleared if the browser is turned off

The validity of cookies is the same as that of a browser. If the browser is closed, the cookies will be automatically cleared and the session will also become invalid.
If you want the cookie to remain valid after closing the browser, you need to set the cookie validity time.

Statement:
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