免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2479 | 回复: 2
打印 上一主题 下一主题

[session 删除]请教如何删除过期的session文件? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-08-04 00:46 |只看该作者 |倒序浏览
已经定义了session存放的路径,
如何删除过期session产生的文件?或者用户关闭浏览器时就自动删除session产生的文件?

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
2 [报告]
发表于 2005-08-04 09:04 |只看该作者

[session 删除]请教如何删除过期的session文件?

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

注: If you are using the default file-based session handler, your filesystem must keep track of access times (atime). Windows FAT does not so you will have to come up with another way to handle garbage collecting your session if you are stuck with a FAT filesystem or any other fs where atime tracking is not available. Since PHP 4.2.3 it has used mtime (modified date) instead of atime. So, you won't have problems with filesystems where atime tracking is not available.


http://w.yi.org/ftp/FAPM/PHP/php_manual_zh/ref.session.html

论坛徽章:
0
3 [报告]
发表于 2005-08-05 09:45 |只看该作者

[session 删除]请教如何删除过期的session文件?

不可能这么及时吧,也没有这个必要好像
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP