simple logging code
public php v1 · immutablefunction log_msg( $s = "" ){ fileputcontents("qry.log", date("d-m-Y h:i:s a :=").$s."\n");}function fileputcontents($path,$string){ $error = false; if(!($fp = fopen($path,'a'))){ $error = true; } if (fwrite($fp, $string) === FALSE) { $error = true; } fclose($fp); if($error){ return false; }else{ return true; }}