Home>Article>Backend Development> How to set session time in php.ini

How to set session time in php.ini

藏色散人
藏色散人 Original
2020-07-31 11:03:11 2549browse

How to set the session time in php.ini: first find and open the "php.ini" file; then modify the content to "session.cookie_lifetime = 0 session.gc_maxlifetime = 600"; finally restart apache.

How to set session time in php.ini

Recommended: "php session (topic)"

php Set the session expiration time in .ini

Close the browser and the session will disappear

The session will disappear after 10 minutes

Modify php.ini File

session.cookie_lifetime = 0 session.gc_maxlifetime = 600

Restart apache after saving

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