PHP: Delete File If Exists
I ran across this function to delete a file from the server if it exists some time ago. It has been very useful to me.
<?php
$DelFilePath = "/home/path/to/file";
if (file_exists($DelFilePath)) {
unlink($DelFilePath);
}
?>
$DelFilePath = "/home/path/to/file";
if (file_exists($DelFilePath)) {
unlink($DelFilePath);
}
?>






not working