如何清除所有用户的会话?

问题描述:

我在我的项目中使用了 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.