wahlhelfer/delete.php

22 lines
485 B
PHP
Raw Normal View History

2014-05-15 16:49:45 +00:00
<?php
include("config/config.php");
session_destroy();
function rrmdir($dir)
{
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != "." && $object != "..") {
if (filetype($dir."/".$object) == "dir")
rrmdir($dir."/".$object);
else unlink ($dir."/".$object);
}
}
reset($objects);
rmdir($dir);
}
}
rrmdir('admin');
$url = SITE_URL;
header("Location:$url");
?>