Use pathinfo for any index files

It's easier to understand more optimal for managing static pages.
This commit is contained in:
danpros 2023-12-29 19:25:16 +07:00
commit 24a1b635d5
3 changed files with 287 additions and 271 deletions

View file

@ -1,12 +1,18 @@
<?php if (!defined('HTMLY')) die('HTMLy'); ?>
<?php
rebuilt_cache('all');
foreach (glob('cache/page/*.cache', GLOB_NOSORT) as $file) {
unlink($file);
}
foreach (glob('cache/index/*.txt', GLOB_NOSORT) as $file) {
unlink($file);
}
foreach (glob('cache/widget/*.cache', GLOB_NOSORT) as $file) {
unlink($file);
}
echo i18n('All_cache_has_been_deleted');
?>