Update from a long time
This commit is contained in:
22
php/delete.php
Normal file
22
php/delete.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?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']);
|
||||
?>
|
Reference in New Issue
Block a user