I got it figured out. I needed $PHP_SELF instead. Brad
Brad Harriger wrote: > I'm trying to create a simple script that logs access to several pages > on a site I'm working on. I want to capture the date and time, address > of the PC accessing the page, and the name of the script being accessed. > I have the following code: > > <?php > $today = date("F j, Y H:i:s"); > $lineOut = $REMOTE_ADDR; > $lineOut .= " "; > $lineOut .= $today; > $lineOut .= " "; > $lineOut .= $SCRIPT_NAME; > $lineOut .= "\n"; > > $fp = fopen("logfile.txt","a"); > fputs($fp,$lineOut); > fclose($fp); > ?> > > Everything works fine except for the line "lineOut .= $SCRIPT_NAME;" The > value of $SCRIPT_NAME is always the path to the PHP executable, not the > script that contains the code. How do I correct this problem. I'm > running PHP 4.06 under Apache 1.3.22 on a Win 2000 PC. > > Thanks in advance, > > Brad > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php