note 64595 deleted from function.clearstatcache by nlopess
| From: | nlopess@php.net | Date: | Wed, 19 Apr 2006 10:38:19 +0000 |
| Subject: | note 64595 deleted from function.clearstatcache by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-108550@lists.php.net to get a copy of this message | ||
Note Submitter: rllq at rllq dot com
----
to check if a file exist and returns true... or false, it doesn't matter. calling
clearstatcache() function will not hurt.
if (file_exists($uploadpath.$filename) == TRUE) {
$_SESSION['clearcache'] = TRUE;
clearstatcache();
} else {
$_SESSION['clearcache'] = FALSE;
clearstatcache();
}
or, check if clearstatcaches() function is already called or not...
if ((file_exists($uploadpath.$filename) == TRUE) || (isset(clearstatcache()))) {
$_SESSION['clearcache'] = TRUE;
clearstatcache();
} else {
$_SESSION['clearcache'] = FALSE;
clearstatcache();
}