Unlink is function used to delete a file from system. Syntax: unlink('file_path');
Example: <?php $file = fopen('test.txt', 'a'); fwrite($file, 'how to delete file'); fclose($file); unlink('test.txt');//delete test.txt file. ?>