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

How to set php session expiration time

藏色散人
藏色散人Original
2020-11-09 09:16:441942browse

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

How to set php session expiration time

Recommendation: "PHP Video Tutorial"

Understanding about session expiration time in PHP:

How to set php session expiration time

Open the directory where the PHP configuration file is located and find the configuration file

How to set php session expiration time

Open the PHP configuration file and search for: maxlifetime

How to set php session expiration time

See: session.gc_maxlifetime=1440, which is the default validity time of session

How to set php session expiration time

##Modify session.gc_maxlifetime

How to set php session expiration time

Notes

You need to restart the service after modifying the PHP configuration file

The above is the detailed content of How to set php session expiration time. 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