Call this new script: write.php, SET the variable $filename (rename wud.png to a real file) and place it in the directory where the file needs to be deleted!
error_reporting(E_ALL);
//$filename: enter the real file name
$filename = 'wud.png';
//$copy: any name is possible
$copy = 'mycopy.png';
if (copy($filename, $copy)){
echo '<br><b>copy</b> '.$filename.' to '.$copy.' <b>success</b>';
}
else{
echo '<br><b>copy</b> '.$filename.' to '.$copy.' <b>failed</b>';
}
if (is_writable($filename)) {
echo '<br>The file '.$filename.' is detected and <b>writable</b>';
}
else {
echo '<br>The file '.$filename.' is <b>not writable</b> or not detected';
}
if (unlink($filename)){
echo '<br>The file '.$filename.' is <b>deleted</b>';
}
else{
echo '<br>The file '.$filename.' is <b>not deleted</b>';
}
if (copy($copy,$filename)){
echo '<br><b>copy</b> '.$copy.' back to '.$filename.' <b>success</b>';
}
else{
echo '<br><b>copy</b> '.$copy.' back to '.$filename.' <b>failed</b>';
}