Utile per chi deve lavorare con le cache
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
$files[] = $file;
}
closedir($dh);
rsort($files, SORT_NUMERIC);
reset($files);
foreach ($files as $k => $file) {
if ($file != "." && $file != "..") {
$j = $k + 1;
$path = $dir."/".$file;
if ($j != 1) {
unlink($path);
}
}
}
}
Feeds
Sondaggio
Condividi
Numeri



Aggiungi un commento