GET_id not working in UnLink (delete file)
Posted: 06 Feb 2023, 21:57
I searching for an hour for a solution; unlink seems not to work with GET id
Hope Coursesweb can help me out.
Code: Select all
<?php
$id = (int) $_GET['id'];
echo $_GET['id'];
$file = fopen("'.$_GET['id'].'.txt","w");
echo fwrite($file,"Succesfully written document ticket);
fclose($file);
unlink("'.$_GET['id'].'.txt");
?>