php登入操作日志,该如何处理

WBOY
Release: 2016-06-13 11:47:19
Original
1082 people have browsed it

php登入操作日志
想记录用戶登入的日志,表如下:
表名: 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!