Delete a file : File Delete « File Directory « PHP






Delete a file

<?php
   $file_delete = "home/meeta/my.php";
   
   if (unlink($file_delete)) {
      echo "The file was deleted successfully.", "\n";
   } else {
      echo "The specified file could not be deleted. Please try again.", "\n";
   }
?>



           
       








Related examples in the same category