}function write_log($action, $text = '') { $fp = @fopen('log.txt', 'a'); if ($fp) { $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '-'); $line = date("m.d.y H:i:s").' '.$_SERVER['REMOTE_ADDR'].' '.$action.' '.$text.' '.$referer."\n"; @fwrite($fp, $line); @fclose($fp); }}
|