clearstatcache, how to use?
| From: | Louie Miranda | Date: | Mon, 25 Oct 2004 06:02:59 +0000 |
| Subject: | clearstatcache, how to use? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-200216@lists.php.net to get a copy of this message | ||
I have this code that checks for a file if it exists and do something
if it doesnt exist. Problem exist when im updating my data on the
directory, even if i did upload it. it still shows the non-existent
data.
I have read that i should add the clearstatcache();, how am i going to
use it? after the file_exists? or before?
here's my code
##
$itemCode_SHOW = $row[2];
$filename =("/www/images/stockprod/$itemCode_SHOW.jpg");
if (file_exists($filename)) {
$itemCode_SHOW = $row[2];
} else {
$itemCode_SHOW = "noimage";
}
clearstatcache();
##
--
Louie Miranda
http://www.axishift.com