clearstatcache, how to use?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux