Re: filemtime function not working

From: Date: Sun, 24 Jun 2001 20:36:20 +0000
Subject: Re: filemtime function not working
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-55050@lists.php.net to get a copy of this message
On Sun, Jun 24, 2001 at 03:19:52PM -0500, Carmen & Gene wrote: > Can anyone out there explain why: > > <?php > // $path = "/path/to/some/php_file/or/$PHP_SELF/"; > print "<I>This page last modified on "; > $LastMod = filemtime("/var/www/html/WebAps/phpRSVP2/rsvp.php"); > print date("l, F j, Y - g:ia",$LastMod) . "</I>\n"; > ?> > > Returns : > This page last modified on Wednesday, December 31, 1969 - 6:00pm > after being run through the above date() params? > > Obviously, the file HAS been modified ever so slightly since that date > in history!! You havent used a correct timestamp. $LastMod is wrong. This means filemtime() delivers something strange or nothing. Please check $LastMod. Timestamps start at 1.1.1970. -Egon -- LinuxTag, Stuttgart, Germany: July 5-8 2001: http://www.linuxtag.de/ All known books about PHP and related books: http://php.net/books.php Concert Band of the University of Hohenheim: http://www.concert-band.de/ First and second bestselling book in German: http://www.php-buch.de/

« previous php.general (#55050) next »