Reputation: 198
$file_name = "x:/htdocs/host/sales_documents/testvilkår, webhotell og domenenavn_2ccda.pdf";
if(!file_exists($file_name))
{
echo "<h2>404 Error</h2>";
exit;
}
File name is a valid file and also it really exist, but still file_exists
is returning false
.
Can you tell me what is a reason behind it?
Upvotes: 3
Views: 196
Reputation: 2968
Change slashes to constant DIRECTORY_SEPARATOR
and add file://
to path.
Upvotes: 0