scc_pg_admission_2025/.google/PG-Admission-with-google-si.../api/delete_file.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);
?>