Mitul Dabhi
answered Aug 8 '21 00:00
unlink() function can be used to delete the file
unlink(file path) : it will delete the file for given file path.
unlink() returns True if file deleted successfully , returns False if file not deleted succesfully
unlink(string $filename, resource $context = ?):return bool
Deletes a file
Code example for unlink:
unlink('unwantedfile.php')
above code will be deleted unwantedfile.php in the same directory.
you can put relative or absolute path like full path