Deleting Files with unlink( ) : unlink « File Directory « PHP






Deleting Files with unlink( )

 
<?
    $filename = 'data.txt';
    if (unlink($filename)) {
            print "Deleted $filename!\n";
    } else {
            print "Delete of $filename failed!\n";
    }
?>
  
  








Related examples in the same category

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