|
Posted by Erwin Moller on 09/10/07 09:23
Ming wrote:
> Hi all,
>
> I wonder if there is a way to kill all active sessions.
>
> Basically, I want to have a page, for example, foo.php. Whenever users
> visit this page, regardless of where they come from, all sessions that
> are from my site will be destroyed.
>
> Thanks,
>
Hi Ming,
Under normal circumstances you have only 1 PHP session belonging to 1
client.
It is not clear to me what you excactly asking.
Did you create multiple session for 1 user?
(Using different sessionnames)
Or do you have a few subdomains that share the same cookie and thus session?
Or do you want to destroy ALL sessions belonging to all the different
visitors? (If so follow Ricks advise, unless you are on a shared host)
In case you just want to empty the current session:
$_SESSION = array();
will do the trick. It will empty the current session (Not destroy it).
Please elaborate a little more on your current setup/task, so we can
give you to-the-point answers (maybe).
Regards,
Erwin Moller
Navigation:
[Reply to this message]
|