The Total PHP site has another introductory tutorial posted showing you how to correctly delete files in your PHP scripts.
Following our tutorials on uploading files and listing files, this tutorial will walk you through deleting files from a directory. This is done using the unlink() function.
Their example is pretty simple (as is the concept) - they show how to check to be sure that the file you want to remove isn't in use/open and then issue the unlink to remove it from the file system.