note 69081 added to ref.filesystem
| From: | nabby86atyahoo dot com at osu1 dot php dot net | Date: | Tue, 22 Aug 2006 14:23:40 +0000 |
| Subject: | note 69081 added to ref.filesystem | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-116171@lists.php.net to get a copy of this message | ||
If a file is updated, and in the same script, you get the stats for the file (the mtime/ctime,
whatever), it will return the older time for that file, despite the fact that it was just edited in
the script.
(The problem I was having was: updating a file, shows the old mod-time, but would only show the
newer time when refreshed)
Use clearstatcache() to get the most updated version, since it's cached by PHP.
<?
clearstatcache();
$timestamp = filemtime($path);
?>
----
Server IP: 216.194.113.175
Probable Submitter: 128.205.195.61
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/ref.filesystem.php
Edit -- https://master.php.net/note/edit/69081
Del: integrated -- https://master.php.net/note/delete/69081/integrated
Del: useless -- https://master.php.net/note/delete/69081/useless
Del: bad code -- https://master.php.net/note/delete/69081/bad+code
Del: spam -- https://master.php.net/note/delete/69081/spam
Del: non-english -- https://master.php.net/note/delete/69081/non-english
Del: in docs -- https://master.php.net/note/delete/69081/in+docs
Del: other reasons-- https://master.php.net/note/delete/69081
Reject -- https://master.php.net/note/reject/69081
Search -- https://master.php.net/manage/user-notes.php