-1
In the system I’m using the file_exists
to see if the image exists in the directory, the problem is that it always returns false
even though the image exists in the directory, I’ve done almost all possible tests and even so returns false
.
Code:
<?php
$Image = "http://megaki/uploads/windows/173/1731534093656.jpeg";
if (file_exists($Image)) {
echo "O arquivo $Image existe";
} else {
echo "O arquivo $Image não existe";
}
?>
When executing returns the message:
O arquivo http://megaki/uploads/windows/173/1731534093656.jpeg não existe
The directory is correct when creating the directory give permission 077
and yet I can’t fix it I’m already 2 days trying to fix it and I can’t.
use
file_get_contents
then save the content to a local file or check directly withfopen
– rafaelphp