This question already has an answer here:
- file_exists not working with localhost URL 2 answers
- How to check if a file exists from a url 6 answers
I'm trying to check if a file exists or not in external url.
(My external url is another project's file in my local directory)
The other project folder is mvf. So I'm trying to get it like:
$url = '//localhost/mvf/assets/img/img.png';
I want to check if this file exists or not for the path above. My code is:
if(file_exists($url)) {
echo "exist";
} else {
echo "no";
}
But the above code always returns no eventhough the file exits.
</div>