You know how to create a file. You know how to open a file in an assortment of different ways. You even know how to read and write data from a file! Now its time to learn how to destroy (delete) files. In PHP you delete files by calling the unlink function.