Home > Backend Development > PHP Tutorial > php登入操作日志

php登入操作日志

PHP中文网
Release: 2016-06-23 14:28:18
Original
1672 people have browsed it

想记录用户登入的日志,表如下:  

表名: users_logs  
id: 自动递增  
ip: 用?的ip地址  
username: 用?名  
logintime: DATETIME (e.g. 2014-02-13 10:18:01)  
type: 操作类型 (e.g. login)  
descriptions: 说明 (e.g. user Andy login)  
 
当用户登入,写入相关信息到表 users_logs  


解决方案

方案一.  每次操作的时候,直接将信息写入log表即可。

方案二.  登陆时,生成session的时候写入表


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