My file_exists()
returns false even if provided image to check https://www.google.pl/logos/2012/haring-12-hp.png
exist. Why?
Below I am presenting full failing PHP code ready to fire on localhost:
$filename = 'https://www.google.pl/logos/2012/haring-12-hp.png';
echo "<img src=" . $filename . " />";
if (file_exists($filename)) {
echo "The file $filename exists";
} else {
echo "The file $filename does not exist";
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…