memberlogin
contactus
randomfacts

How to delete a file with php unlink

To delete a file using php is very simple.  First you need to know what the name of the file is that you are deleting which is what I set the ourFileName variable to.  Then you simply use the unlink function and the file will be deleted.  If the file is not in the current directory - then you would include the directory path to the file name.  For example ourFileName = "mynewdocuments/newpage.txt".

<? 

$ourFileName = "newpage.txt";
 unlink($ourFileName);
?>