利用thinkphp的行为扩展做系统日志
1:模块配置:
array('admin\\behaviors\\logbehavior'),);
2:数据库建表:
create table logs( id int(11) primary key auto_increment, url char(30) not null, operator int(11) not null, description char(60) not null, operate_time int(10) not null)charset=utf8 engine=myisam;
3:行为类编写:
where(array('m_c_a'=>$data['url']))->find(); $data['description'] = $node['node_name']; // var_dump(app_debug); m('logs')->add($data); }}?>
4:效果展示:
版权声明:没有什么版权不版权的,如果你喜欢,拿去用。