note 105888 added to function.clearstatcache
| From: | matt_m at me dot com | Date: | Fri, 23 Sep 2011 10:04:37 +0000 |
| Subject: | note 105888 added to function.clearstatcache | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-183364@lists.php.net to get a copy of this message | ||
unlink() does not clear the cache if you are performing file_exists() on a remote file like:
<?php
if (file_exists("ftp://someftpserver.com/somefile"))
?>
In this case, even after you unlink() successfully, you must call clearstatcache().
<?php
unlink("ftp://someftpserver.com/somefile");
clearstatcache();
?>
file_exists() then properly returns false.
----
Server IP: 64.71.164.2
Probable Submitter: 98.217.234.122
----
Manual Page -- http://www.php.net/manual/en/function.clearstatcache.php
Edit -- https://master.php.net/note/edit/105888
Del: integrated -- https://master.php.net/note/delete/105888/integrated
Del: useless -- https://master.php.net/note/delete/105888/useless
Del: bad code -- https://master.php.net/note/delete/105888/bad+code
Del: spam -- https://master.php.net/note/delete/105888/spam
Del: non-english -- https://master.php.net/note/delete/105888/non-english
Del: in docs -- https://master.php.net/note/delete/105888/in+docs
Del: other reasons-- https://master.php.net/note/delete/105888
Reject -- https://master.php.net/note/reject/105888
Search -- https://master.php.net/manage/user-notes.php