i wrote this script myself and cannot see why it isnt working D:
its supposed to log page views when put in an include.
the output is supposed to look like
Code:
May 17, 2012 12:50 am test 150.101.28.41 /page.php?variable=example
It doesnt produce any errors but no output appears in log.txt
both this file and log.txt are chmod777
PHP Code:
<?
$logfile = log.txt;
$today = date("F j, Y, g: i a");
$name = test;
$ip = getenv("REMOTE_ADDR");
$page = $_SERVER['REQUEST_URI'];
#logging time :D
$lgfp = fopen($logfile,"a");
$logline = $today . "\t";
$logline .= $name . "\t";
$logline .= $ip . "\t";
$logline .= $page . "\n";
fputs($lgfp,$logline);
fclose($lgfp);
?>