To delete files, simply pass a filename string as the only parameter to unlink(). Note that unlink deals only with files - to delete directories you need rmdir().
<?php if (unlink($filename)) {
print"Deleted $filename!\n";
} else {
print"Delete of $filename failed!\n";
} ?>
Author's Note: if you have a file opened with fopen(), you need to fclose() it before you call unlink()