Re: Date
| From: | Mike Eheler | Date: | Tue, 11 Dec 2001 22:58:27 +0000 |
| Subject: | Re: Date | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-77371@lists.php.net to get a copy of this message | ||
If you only have the text directory listing and don't have access to the file to do a filetime() call on, you can try this:
$modified = stat('header.php');
echo 'Last Modified: ' . date('F j, Y, g:i a', strtotime(substr($modified[9],35,12)));
Tha's a really long way around it, and a much better way is to just use filetime() function.
Mike
Brian V Bonini wrote:
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?