first commit
This commit is contained in:
17
CONTENT/ROOT_URI/api/delete_file.php
Normal file
17
CONTENT/ROOT_URI/api/delete_file.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?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);
|
||||
?>
|
||||
Reference in New Issue
Block a user