Home > Backend Development > PHP Tutorial > What is the life cycle of session_PHP Tutorial

What is the life cycle of session_PHP Tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-20 11:05:04
Original
975 people have browsed it


How long is the life cycle of a session?
1 When the browser ends, its life cycle also ends, but the file still exists in /tmp/(sess_???)
2 The next time you reopen the browser The session ID will be reassigned. If you use session_id() to bring back the previous ID, it will read the sess_??? that remains in /tmp and retrieve all the parameters you have set before.
3 You can Modify the remaining time of the session file in php.ini
session.gc_maxlifetime = 1440; after this number of seconds, stored
; data will be seen as 'garbage' and
; cleaned up by the gc process
Default is 1440 seconds, 24 minutes

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445156.htmlTechArticleWhat is the life cycle of a session? 1 When the browser ends, its life cycle also ends, but the file still exists in /tmp/(sess_???) 2 sessi will be redistributed the next time you reopen the browser...
Related labels:
source:php.cn
Statement of this Website
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
Latest Issues
Session
From 1970-01-01 08:00:00
0
0
0
session
From 1970-01-01 08:00:00
0
0
0
session login information
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template