unlink file php code example
Example 1: php how to delete file
if(file_exists($file)) {
unlink($file);
}
Example 2: php unlink
<?php
unlink('test.html');
?>
Example 3: unlink() in php
<?php
// use unlink('filename.extension') to delete a file
// For example:
unlink('foo.php'); // will remove the file named foo.php
// Happy coding, my homies! <3
?>