How to set session validity period in php

王林
Release: 2023-03-05 11:48:02
Original
4650 people have browsed it

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.

How to set session validity period in php

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;

How to set session validity period in php

#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)

How to set session validity period in php

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template