unlink() will only work if you have permission to remove the file...
So make sure you put in some test and a nice error if it fails, this isn't the exact syntax, but something like this is what I'd do..
<?
$testUnlink = @unlink("filename.file");
if ($testUnlink)
{
echo "File removed";
}
else
{
echo "Error in removing file";
}
?>
That way you avoid any nasty error messages that it may show up... Though for testing you may want to remove the @ 🙂