18 lines
478 B
PHP
18 lines
478 B
PHP
<?php
|
|
$targetfile = $_GET['name'];
|
|
$targetfolder = $_GET['folder'];
|
|
$filepath = APP_DIR."$targetfolder/".$targetfile."";
|
|
$ret->path= $filepath;
|
|
if(file_exists($filepath)){
|
|
if(unlink($filepath)) {
|
|
$ret->status="success";
|
|
$ret->msg="Removed";
|
|
} else {
|
|
$ret->status = "error";
|
|
$ret->msg= "Error in deleting group";
|
|
}
|
|
} else $ret->msg= "File not found";
|
|
|
|
echo json_encode($ret);
|
|
?>
|