PHP Learning : How To Delete Text File in Php - Publik Talk

Breaking

An informative website for every one.

Post Top Ad

Post Top Ad

Thursday, August 3, 2017

PHP Learning : How To Delete Text File in Php

Description:

In php, we can delete any file using unlink() function. The unlink() function accepts one argument only: file name.

Code:

<?php    
$myfile =unlink('check.txt');
 if($myfile)
{
echo "File deleted successfully";  
}
else
{
echo "Sorry!";  
}
?>



Output:



No comments:

Post a Comment

Post Top Ad