note 76730 deleted from ref.filesystem by felipe
| From: | felipe@php.net | Date: | Mon, 10 Dec 2007 18:01:57 +0000 |
| Subject: | note 76730 deleted from ref.filesystem by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133239@lists.php.net to get a copy of this message | ||
Note Submitter: shouri at gmail dot com
----
Here's a little script I added to my set of web pages to insert a line saying when the set of
web pages were last updated:
<?php
$latesttime = 0;
if ($handle = opendir('/home/shouri/public_html')) {
while (false !== ($file = readdir($handle))) {
$recenttime = filemtime($file);
if ($recenttime > $latesttime )
$latesttime = $recenttime;
}
closedir($handle);
echo("Last updated on " . date("F d Y", $latesttime) . " at " .
date("H:i", $latesttime) . " IST");
}
?>
The html output looks like:
Last updated on July 28 2007 at 20:19 IST