diff options
Diffstat (limited to 'Neutron-trunk/api/admin/cache_content_reset.php')
-rw-r--r-- | Neutron-trunk/api/admin/cache_content_reset.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Neutron-trunk/api/admin/cache_content_reset.php b/Neutron-trunk/api/admin/cache_content_reset.php new file mode 100644 index 0000000..6e9e02b --- /dev/null +++ b/Neutron-trunk/api/admin/cache_content_reset.php @@ -0,0 +1,14 @@ +<?php + +require_once $_SERVER['DOCUMENT_ROOT'] . "/api/lang/processor.php"; + +if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache")) { + $dir = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache"); + foreach ($dir as $file) { + if (!($file == "." || $file == ".." || $file == ".htaccess")) { + if (substr($file, 0, 5) == "page-") { + unlink($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/$file"); + } + } + } +}
\ No newline at end of file |