Problem with cache in file_exists() function
Posted: Thu Oct 21, 2004 7:44 am
Hi, I'm looking if some files exists and if they don't, I create them manually (they're flash files). The problem is that after uploading them, they are still being shown as inexistant files... After some headache I found that there could be a cache problem, I tried using clearstatcahce() but probably I'm using it worng
. Here is the relevant part of the code:
This generates a table (start and ends are out) this way:
| * | ID | name | address | Modify button |
Any help would be appreciated. Thank you very much
Code: Select all
<?php
#Show the result in a table
while ($row=mysql_fetch_array($result)) {
if ($row["IDalojamiento"] < 10) { $numero = '00'.$row["IDalojamiento"]; }
elseif ($row["IDalojamiento"] < 100) { $numero = '0'.$row["IDalojamiento"]; }
else { $numero = $row["IDalojamiento"]; }
if (!(file_exists($root.'alojamientos/pel/alo'.$numero.'.swf'))) {
echo '<tr>';
echo '<td align="center" class="labelcell">';if ($row["alta"] == 1) { echo '*'; }
echo '</td>';
echo '<td align="center" class="labelcell">'.$row["IDalojamiento"].'</td>';
echo '<td align="left" class="labelcell">'.$row["nombre"].'</td>';
echo '<td align="left" class="labelcell">'.$row["direccion"].'</td>';
echo '<td align="center" class="fieldcell"><a href="contenido.php?sistema=1&seccion=modificacion&id='.$row["IDalojamiento"].'">Modificar</a></td>';
echo '</tr>';
}
#Clear cache
clearstatcache();
}
?>| * | ID | name | address | Modify button |
Any help would be appreciated. Thank you very much