function flog($fname, $ftext, $write_a_w_state = null){ if(!$write_a_w_state) $write_a_w_state = "a+"; $fp = fopen("/home/d/dlmlru/posuda/public_html/log/" . $fname, $write_a_w_state); fwrite($fp, date("Y-m-d H:i:s ") . $ftext . " "); fclose($fp); }