简体   繁体   中英

How to make an Audit Trail / Activity Log using PHP

Is there a template already out there for PHP/MySQL that tracks the activity of a user? I already have audit trail but it only gets the time of logged in/log out. Not the changes or activity he did on his/her login.

The best logging framework for php is log4php , since its from Apache itself. log4php has flexibility to choose the log storage (mysaql, text file or email)

However the basic idea of user activity tracking is this:

  1. Define the 'actions' performed by your website users, in a database table (action)
  2. Map actions performed by the users using one relational table (user_action)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM