且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

按ID结束会话。

更新时间:2023-12-04 19:30:22

您是否仍然可以在线时删除用户?这有几种不同的方式。我不确定,但也许你可以像你说的那样做,并将会话ID存储在数据库中,可以通过session_id()调用然后清除,或者可能是session_destroy()的东西?


我认为你需要努力工作,如果你应该从你的数据库中删除,因为如果有人在使用你的系统,他们肯定希望他们能够控制它何时被删除?通过将它留在他们的手中,他们可以删除它,然后运行session_destroy()将它们记录下来。


我会为你寻找远程session_destroying。
Will you be deleting users often while they could still be online? THere are a few different ways. I am not sure, but maybe you can do as you say and store the session id in the database which can be recalled by session_id() and then cleared, or maybe something with session_destroy()?

I think you need to work hard at working out if you should be deleting from your database, because if someone is using your system, surely they want confidence that they have control on when it is deleted? By leaving it in their hands they can delete it and then run a session_destroy() to log them out.

I''ll have a look around for remote session_destroying for you.


我环顾四周但看不到任何东西。我在想这样的事情。


<?php

session_destroy(
I looked around but didn''t see anything. I was thinking something like this.

<?php
session_destroy(


sessionid);

?>
sessionid);
?>