• PHP Video Tutorials

PHP - Function delete()



The delete() function deletes a file and returns true on success and false on failure.

Syntax

void delete ( string file )

The delete() function is a dummy manual entry to satisfy those people who are looking for unlink() or unset() in the wrong place.

Example

<?php
   echo delete("/PhpProject/sample.txt");
   echo "File has been deleted successfully";
?>

Output

File has been deleted successfully
php_function_reference.htm
Advertisements