Home > Backend Development > PHP Tutorial > 当用户登录时,怎么判断用户是否在别处已经登录

当用户登录时,怎么判断用户是否在别处已经登录

WBOY
Release: 2016-06-13 13:22:55
Original
1692 people have browsed it

当用户登录时,如何判断用户是否在别处已经登录?
当用户登录时,如何判断账号是否在别处已经登录?

------解决方案--------------------
主要思路:
1.登录时,将用户的SessionID记录下来
2.验证登录时,将记录的该用户SessionID与当前SessionID匹配
3.如果不相同,说明在别处登录

不能上传附件,demo发到这里了:
http://bbs.lampbrother.net/read-htm-tid-121909-ds-1.html

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template