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

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -