What is the life cycle of session?
1 When the browser ends, its life cycle also ends, but the file still exists in /tmp/(sess_???)
2 The session ID will be reassigned the next time you reopen the browser. If you use session_id() to replace the previous Bring back the ID, it will read the remaining sess_??? at /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
The default is 1440 seconds, 24 minutes