Home > php教程 > php手册 > PHP 如何判断当前用户已在别处登录,当前用户在别处

PHP 如何判断当前用户已在别处登录,当前用户在别处

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 09:17:35
Original
1138 people have browsed it

PHP 如何判断当前用户已在别处登录,当前用户在别处

出处:http://bbs.lampbrother.net/read-htm-tid-121909-ds-1.html#tpc

主要思路:
1.登录时,将用户的SessionID记录下来
2.验证登录时,将记录的该用户SessionID与当前SessionID匹配
3.如果不相同,说明在别处登录
具体请看demo代码,内有注释。








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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template