Скрипт для очистки заданной директории
< ?php
if ($cache_folder = opendir(‘/abs_path_to_cache_folder/’)) {
while (false !== ($file = readdir($cache_folder))) {
if ($file != “.” && $file != “..”) {
unlink (“/abs_path_to_cache_folder/$file”);
}
}
closedir($cache_folder);
}
?>