This is a discussion on clearstatcache() not working. within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Maybe I am doing something wrong. I can't seem to clear status of a files_exists() finction using clearstatcache(). In ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Maybe I am doing something wrong. I can't seem to clear status of a files_exists() finction using clearstatcache(). In this particular script, the $file may or may not exist depending on what is happening in other background applications. For some reason, even when the while it's gone file_exists still returns true. What gives? Is there something I need to configure in php?
//Clear cache clearstatcache(); //Set the path $file = "/path/to/file"; //Is the file still there? if (file_exists($file)) { ....Do Something; } else { ..Do Something else.} |