I am trying to create a self-destruct file. Wht I mean is, if a conditional equates to true, the file deletes itself.
Seems to me the following code should do the trick. However, it does nothing. What am I doing wrong?
<?php
phpinfo();
// The following should be activated when the url is
// selfdestruct.php?delete=1, correct?
if ($_GET['delete']==1) {
$file = 'selfdestruct.php';
unlink($file);
}
?>
Thanks for your hep in advance! I appreciate it! :-)