note 32728 added to function.filemtime
| From: | paranoid at dds dot nl | Date: | Thu, 05 Jun 2003 10:43:02 +0000 |
| Subject: | note 32728 added to function.filemtime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-49784@lists.php.net to get a copy of this message | ||
To get the last modification time of a directory, you can use this:
<pre>
$getLastModDir = filemtime("/path/to/directory/.");
</pre>
Take note on the last dot which is needed to see the directory as a file and to actually get a last
modification date of it.
This comes in handy when you want just one 'last updated' message on the frontpage of your
website and still taking all files of your website into account.
Regards,
Frank Keijzers
----
Manual Page -- http://www.php.net/manual/en/function.filemtime.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32728
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32728&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32728&report=yes