Home  >  Article  >  Backend Development  >  How to set login expiration time in php session

How to set login expiration time in php session

藏色散人
藏色散人Original
2020-07-13 09:19:463389browse

How to set the expiration time for php session: First open the directory where the PHP configuration file is located. And find the configuration file; then open the PHP configuration file and search for "maxlifetime"; finally modify the default validity time of the session.

How to set login expiration time in php session

##See: session.gc_maxlifetime=1440, which is the default for session The valid time unit is seconds

1440 seconds=24 minutes

7200=2 hours

3600=1 hour

For more related knowledge, please visit

PHP中文网!

The above is the detailed content of How to set login expiration time in php session. For more information, please follow other related articles on the PHP Chinese website!

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