createing a log file
| From: | Prince | Date: | Sat, 19 Apr 2003 18:00:59 +0000 |
| Subject: | createing a log file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144489@lists.php.net to get a copy of this message | ||
hi..
have a log file im trying to write (simple one right now ) but heres the
code for it:
$date=date("M/d/Y");
$log=fopen("login.log", "a");
fwrite($log, "[$date] $user logged in\n");
fclose($log);
include("main.php");
}
?>
heres the output for it after i put my username/password in the login screen
and log in i get this in the log file:
[Apr/19/2003] root logged in
[Apr/19/2003] logged in
any idea how to fix the line with no username in it? expecially when i dont
have code for it anywhere...