Home >Backend Development >PHP Problem >How to set session expiration time in php

How to set session expiration time in php

hzc
hzcOriginal
2020-06-10 16:42:254740browse

How to set session expiration time in php

How to set the session expiration time in php:

1. Understanding the session expiration time in PHP:

How to set session expiration time in php

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

How to set session expiration time in php

3. Open the PHP configuration file and search for: maxlifetime

How to set session expiration time in php

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

How to set session expiration time in php

5. Modify session.gc_maxlifetime

How to set session expiration time in php

Recommended tutorial: "php tutorial"

##Related topic recommendations: php session (including pictures, texts, videos, cases)

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