Unset a specefic session using session id

前端 未结 4 1948
醉梦人生
醉梦人生 2020-12-11 08:13

I am the admin of the the site.I want unset a particular session, i know its session id

The users just stating the session like this

session_id(\"us         


        
4条回答
  •  佛祖请我去吃肉
    2020-12-11 08:54

    As far as I know, the only supported way to do so with the default session handler is to impersonate the user with session_id("usernumber"); and then remove the values.

    You could also store sessions in a database, which would make this all pretty straightforward, yet you need to write your own session handling code.

    BTW, the session ID is supposed to be a long random string which you cannot guess. Using 123 means that any anonymous visitor can easily log in with any user credentials.

提交回复
热议问题