保持帐户登录 [英] Keep Accounts Logged In

查看:37
本文介绍了保持帐户登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个内部控制面板,办公室的所有员工都全天登录,包括客户服务.我希望对其进行设置,以便在会话到期前让您保持登录状态 1 小时.如何在 PHP.ini 中更改此设置?在我理解将保持会话打开直到浏览器窗口关闭但它没有坚持之前我做了一个更改.

We have an internal control panel that all employees in the office are logged into all day, including customer service. I'd like for it to be setup so that it keeps you logged in for 1 hour before your session expires. How can I change this in the PHP.ini? I made a change before I understood would keep the session open until the browser window was closed but it didn't stick.

推荐答案

您可以设置两个不同的值:

There are two different values you can set:

session.gc_maxlifetime 指定数据将被视为垃圾"并可能被清理的秒数.

session.gc_maxlifetime specifies the number of seconds after which data will be seen as 'garbage' and potentially cleaned up.

和 session.cookie_lifetime,即 cookie 的持续时间.

and session.cookie_lifetime which is how long the cookie will last.

http://www.php.net/manual/en/session.configuration.php

这两个值都可以在 php.ini 文件中设置,但可能会在 .htaccess 文件或使用 ini_set 的脚本中被覆盖.

both values can be set in the php.ini file, but might get overriden in .htaccess files or in your scripts using ini_set.

这篇关于保持帐户登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆