Create log file using php

ali1

New Member
I am creating a back office website , and need to trace the operations done on the website , for that I need a to generate a log file of every operation for example : Date-Time -User-Operation.I have tried files but did not really work \[code\]$query_add="UPDATE auth_table SET etat = replace(etat,'$anc','$nv') where user_id LIKE '%$log%'";$query_exec=mysql_query($query_add) or die(mysql_error()); ?><script language='JavaScript'>alert('Activation termine')</script><?$date = date("Y-d-m"); $heure = date("H:i"); $op=$date.$heure.'Activation du compte de'.$log.'par administrateur'.$logad; $fp = fopen('log.txt', 'w');fseek($fp,0);fputs($fp, $op);fclose($fp);\[/code\]Any idea on how to do this ?
 
Back
Top