note 54559 rejected from function.clearstatcache by nlopess
| From: | nlopess@php.net | Date: | Tue, 27 Dec 2005 14:45:04 +0000 |
| Subject: | note 54559 rejected from function.clearstatcache by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-100793@lists.php.net to get a copy of this message | ||
Note Submitter: steve at nexusuk dot org
----
Probably should be considered a bug (and I will submit a bug report), but it is also worth knowing:
If you use relative path names and change the working directory then the cached data may point at
the wrong file. I.e., the following code:
$a = file_exists('foo.txt');
chdir('bar');
$b = file_exists('foo.txt');
If 'foo.txt' existed when checked the first time then the second file_exists() call will
also return true, even if 'bar/foo.txt' doesn't exist.