Files
scc_pg_admission_2025/.google/PG-Admission-with-google-sign-in/api/delete_file.php
ns77@siliconpin.com 5c1e30c087 initial commit
2025-08-18 12:05:35 +00:00

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