How to kill a/all php sessions?

后端 未结 9 1212
暖寄归人
暖寄归人 2020-11-28 10:07

I have a very basic php session login script. I want to force logout of a certain user or force logout of all users.

How can I read all sessions made to my website,

9条回答
  •  無奈伤痛
    2020-11-28 10:27

    You can use session_save_path() to find the path where PHP saves the session files, and then delete them using unlink().

提交回复
热议问题