Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个在 LAMP 上运行的 php 应用程序。所有表单信息都需要存储在数据库中。当用户超过 30 分钟未提交表单时,尝试稍后提交 php 会话变量过期。
我该如何解决这个问题?
在 php.ini 中设置会话过期时间更长(会话垃圾收集器)
并设置更长的 cookie 生命周期(如果您使用 cookie 存储会话 ID)
也许,您可以使用 hack;就像使用 Ajax 帖子来保持会话打开!?
我已经使用此技术向 tue 用户显示提醒或问题“你空闲吗?”。在后台,Ajax 帖子使用“session_start()”调用 PHP 脚本来维护会话。