I have a problem when checking if a file exists in zend framework 2:
When checking:
is_file("/usr/local/zend/apache2/htdocs/my_viena/panel/public/img/familias/101.jpg")
which is the absolute route in my computer, it returns true.
When checking:
is_file($this->basePath()."/img/familias/101.jpg")
which is the route from the module, it returns false.
If I make:
echo "<img src='".$this->basePath()."/img/familias/101.jpg'>";
the browser shows de image correctly.
What is wrong in my code? I want to check if the file exists with the relative route.