Deleting a file : unlink « File Directory « PHP






Deleting a file

 
<?php
$file = '/tmp/junk.txt';
unlink($file) or die ("can't delete $file: $php_errormsg");
?>
  
  








Related examples in the same category

1.Deleting Files with unlink( )
2.Delete a file with the unlink() function.
3.Using file_exists, touch, and unlink together
4.Using the unlink() Function
5.You can remove an existing file with the unlink() function.
6.Deleting files
7.Moving a file across filesystems