What is the way to get cookie and session expiration time?
Reply to discussion (solution)
The expiration time of the cookie is the one you specified
The remaining time can be calculated using JS, PHP can only be obtained by adding the auxiliary cookie variable
Session expiration time is 0, no need to consider
Is there any way to view the get or something? The session expiration time is not 0, php.ini inside has the configuration
Yes, there's a configuration in php.ini.
; Lifetime in seconds of cookies or, if 0, until browser is restarted.
; Http://php.net/session.cookie-lifetime
Session.cookie_lifetime = 0
Session.cookie_lifetime = 0 means that the browser closes the session and it expires.
Yes, the session was supposed to shut down the browser.
But the session itself can also set the expiration time ah, session.gc_maxlifetime = 1440 in the case of the browser does not close, continuous 1440s No operation of the session will also expire
More and more far away.
Session.gc_maxlifetime represents the minimum duration of session temporary files, not the expiration time
Session.gc_maxlifetime = 1440
means that the session temporary file can be deleted (but not necessarily deleted) after 1440 seconds of the last visit.
If you stay on a page for 24 minutes without doing anything, logging out of his login is also not an easy one.
Study the