file_name; $file_name = $_SERVER['DOCUMENT_ROOT'] . '/log/' . $file_name . '.txt'; $fileopen=fopen($file_name, 'a+'); $write=@date('d') . '.' . @date('m') . '.' . @date('Y') . ' ' . @date('G') . ':' . @date('i') . ':' . @date('s') . ' ' . $txt . ' -> ' . $_SERVER['HTTP_USER_AGENT'] . ' -> ' . USER_IP . "\r\n"; fwrite($fileopen,$write); fclose($fileopen); } } ?>