如何清除所有用户的会话? [英] How to clear session of all users?

查看:69
本文介绍了如何清除所有用户的会话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中使用了 php 会话,我更新了代码:向会话添加了一些值.现在我需要清除所有现有的会话

I using php sessions in my project,i updated code:added some values to session.now i need to clear all existing sessions

ps.我的操作系统是 ubuntu 9.04

ps.my OS is ubuntu 9.04

推荐答案

默认情况下,PHP 会话信息存储在/tmp/下的文件中.文件名通常以 sess_ 为前缀.所以删除这些文件会清除现有的会话.php.ini 文件可能已被更改以更改这些文件的位置,因此如果找不到正确的文件,请检查它.

By default PHP session information is stored in files under /tmp/. The filenames are usually prefixed with sess_. So removing these files would clear out the existing sessions. The php.ini file may have been altered to change the location of these files, so check it if you can't find the right files.

这篇关于如何清除所有用户的会话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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