Home > Backend Development > PHP Tutorial > gc.max_lifetime 无效

gc.max_lifetime 无效

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:46:02
Original
1764 people have browsed it

处于登录状态的用户一段时间不活动会被自动退出,修改gc.max_lifetime 时间为14天,仍然没有效果,再很短时间内就被退出了

回复内容:

处于登录状态的用户一段时间不活动会被自动退出,修改gc.max_lifetime 时间为14天,仍然没有效果,再很短时间内就被退出了

session依赖于cookie---session是通过cookie传递的,你如果有这个要求,就要设置session-cookie的生命周期。
void session_set_cookie_params ( int $lifetime [, string $path [, string $domain [, bool $secure = false [, bool $httponly = false ]]]] )
session_set_cookie_params — Set the session cookie parameters

请查阅php手册得到其详细解释。

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