1
I’m having a problem using the php function that checks if any file exists in a directory using file_exists but always returns false even if the file being in the directory someone would have a solution for it
$filename = 'http://megaki/uploads/windows/thumb.jpg';
if (file_exists($filename)) {
echo 'O arquivo existe no diretorio.';
} else {
echo 'O arquivo não existe nesse diretorio.';
}
remembering the image exists in the windows directory but while running returns the message from Else that the file cannot be found I am using wampserver local
tried using $_SERVER[ 'DOCUMENT_ROOT' ] to get the absolute path of the file and see if it works that way?
– Diego Lela
thanks using the absolute path worked
– diogo Dsa
That your link is weird wouldn’t be megaki.com?
– WMomesso