Files
arif_grafin/CONTENT/ROOT_URI/api/delete_file.php
dev@siliconpin.com a3067c5ad4 first commit
2025-08-07 11:53:41 +05:30

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);
?>