I need to check if a particular file exists on a remote server. Using is_file() and file_exists() doesn't work. Any ideas how to do this quickly and easily?
The actual code looks like this:
if (file_exists($filename)) {echo $player;
} else {
echo 'something';
but it displays the player even if the id is not called from the url
i need something like this:
check if $filename exists and $…
When displaying images on our website, we check if the file exists with a call to file_exists(). We fall back to a dummy image if the file was missing.
However, profiling has shown that this is the slowest part …