I used the unlink method to delete the image
This image is located only in this folder.
$filename = "warning-icon.jpg";
if (file_exists($filename)) {
unlink($filename);
echo 'File '.$filename.' has been deleted';
} else {
echo 'Could not delete '.$filename.', file does not exist';
}
But the image is not deleted.
I have a server name called web04, which is my default name (client server name). I cannot delete images from a folder on this server. The same code that I checked on my localhost system, here the image is deleted. But in the web04 server, the image is not deleted.
Please help me. Thanks at Advance.
source
share