23 lines
424 B
PHP
23 lines
424 B
PHP
<?php
|
|
|
|
error_reporting(E_ALL);
|
|
ini_set('display_errors', TRUE);
|
|
ini_set('display_startup_errors', TRUE);
|
|
|
|
$root = $_SERVER["DOCUMENT_ROOT"];
|
|
|
|
$directory = "/uploads/";
|
|
|
|
if(isset($_GET["file"])) {
|
|
$file = $root.$directory.$_GET["file"];
|
|
if(file_exists($file))
|
|
unlink($file);
|
|
else {
|
|
header("HTTP/1.1 400 File not Found");
|
|
echo "File not Found";
|
|
exit();
|
|
}
|
|
}
|
|
//header('Refresh:0; url='.$_SERVER['HTTP_REFERER']);
|
|
?>
|