Home>Article>Backend Development> How to set session time in php.ini
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.
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!