i have a weird issue with a script i made to automatically show the modified date of the index page a user will see when they first come to my website. when i reference the file with the with only the domain name, www.mydomain.com, i get erroneous data (it gives me a date of Wed Dec 31 1969 7:00 PM). if i put www.mydomain.com/index.php i get the correct last modified date. my code is as follows:
at the top of my script i have the following:
<?php
$mtime = filemtime(basename($_SERVER['REQUEST_URI']));
?>
this pulls the name of the file, formats the filename and then pulls the date/time info and puts it in a variable named $mtime
later on i print the string out:
<?php
echo "<i> Last Updated on ".date(" D M d Y g:i A", $mtime)."</i>";
?>
everything seems to be working when i call the script completely, but since its my index i need it to work without putting in index.php. its driving me nuts, so if anyone can help i would greatly appreciate it.
thanks!
keh