php - file_exist function won't work -
I have a function that checks that the mobile image is present, and if so, it will return the truth, no difference What I can do is that I can not work this function properly.
public function mobileImageExist ($ image) {$ file = "images / $ image"; If (file_exists ($ file)) is true; return false; } I have also tried
public function mobile imageexist ($ image) {$ file = dirname (__ file __). "/ Images / $ image"; If (file_exists ($ file)) is true; return false; } The $ image parameter that the function is being passed is just the name of the image eg: banner_mobile.jpg
Comments
Post a Comment