php method to set the session validity period: first enter the php installation directory, find and open the php.ini configuration file; then find the configuration session.gc_maxlifetime, modify the validity time as needed; finally restart the php service.
Specific method:
(Video tutorial recommendation: php video tutorial)
Enter first In the directory where the PHP configuration file is located, find the configuration file and open it;
#Then find the configuration session.gc_maxlifetime=1440. This configuration is the default validity time of the session. Adjust it as needed. Just change it.
(Related recommendations: php training)
Just restart php after the modification is completed.
The above is the detailed content of How to set session validity period in php. For more information, please follow other related articles on the PHP Chinese website!