note 46843 added to function.filemtime
| From: | php-general at lists dot php dot net | Date: | Mon, 25 Oct 2004 16:04:23 +0000 |
| Subject: | note 46843 added to function.filemtime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-79078@lists.php.net to get a copy of this message | ||
Last Refresh was <?
clearstatcache();
$hours = date("H", time() - filemtime("somefile.txt"));
$mins = date("i", time() - filemtime("somefile.txt"));
$secs = date("s", time() - filemtime("somefile.txt"));
if ($hours > 0)
echo "$hours hours ";
if ($mins > 0)
echo "$mins minutes ";
if ($secs > 0)
echo "$secs seconds ";
?> ago.
in case anyone wantted that, i know i did :-)
----
Manual Page -- http://www.php.net/manual/en/function.filemtime.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46843
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46843&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46843&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46843&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46843&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46843&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46843&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46843&report=yes
Search -- http://master.php.net/manage/user-notes.php