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");


-----Original Message-----
From: Brian V Bonini [mailto:[EMAIL PROTECTED]]
Sent: 11 December 2001 14:35
To: PHP Lists
Subject: [PHP] Date

Why is this:

$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


PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to