RE: [PHP] Date

From: Date: Tue, 11 Dec 2001 15:56:41 +0000
Subject: RE: [PHP] Date
Groups: php.general 
Request: Send a blank email to php-general+get-77304@lists.php.net to get a copy of this message
Well, 1st Jan 1970 is the start of the Unix epoch (i.e. what you'd get for doing a date() on a timestamp of 0). Seeing as 31st Dec 1969 is fairly close to this, it's worth checking that header.php exists and that your stat() call isn't returning null or a negative. if (file_exists ("header.php")) { $modified = stat ("header.php"); echo "Last modified: ".date("F j, Y, g:i a",$modified[9]); } else { echo "Can't find header.php!"; } You could also try with stat("/complete/path/to/header.php"); HTH Jon -----Original Message----- From: Brian V Bonini [mailto:b-bonini@home.com] Sent: 11 December 2001 14:35 To: PHP Lists Subject: [PHP] Date Why is this: <?php $modified = stat("header.php"); echo "Last Modified: ".date("F j, Y, g:i a",$modified[9]); ?> returning this: Last Modified: December 31, 1969, 7:00 pm from this: -rw-r--r-- 1 gfxdesi vuser 1196 Dec 11 09:22 header.php Anyone?

« previous php.general (#77304) next »