0

I am not sure what the issue is, I am trying to delete a file in PHP. The file has spaces in the filename.

So here, is what I am doing :

$filename = "'" . "files/".$results["filename"] . "'";


if (file_exists($filename))
{
    $success = unlink($filename);
}
else
{
    $echo "Could not Delete the file  " . $filename;
}

However, I am getting a File Not exist error. However, I can see that file exists in the folder.

I know it might have been asked a million times, however I could not find it.

Kiran
  • 8,034
  • 36
  • 110
  • 176

0 Answers0