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");
?>
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");
?>
Code: Select all
<?php
$file_pointer = $_GET[file].'.txt';
if (!unlink($file_pointer)) {
echo ("File can’t be deleted!");
} else {
echo ("File deleted!");
}
?>