12 lines
342 B
PHP
12 lines
342 B
PHP
<?php
|
|
$targetfile = $_GET['name'];
|
|
$targetfolder = $_GET['folder'];
|
|
$filepath = APP_DIR."/$targetfolder/".$targetfile."";
|
|
if(file_exists($filepath)){
|
|
if(unlink($filepath)) {$ret->status="y";$ret->msg="Removed"; }
|
|
else $ret->msg= "Error";
|
|
} else $ret->msg= "File not found";
|
|
|
|
echo json_encode($ret);
|
|
?>
|