0
It is possible to consistently access files outside the public_html folder on the server to render a View?
What I need is to call files js
and css and point out the images that are inside the layer View that is in app. This in turn would be at the same level of public_html
, and not inside it. The public_html
would contain only one file called index.php
and the .htaccess
. To index.php
would call the Init.php
in the app root that defines the routes and passes to the application’s Core to render the layout through the file Bootstrap.php
The MVC
app/
Model/
View/
templates/
css/
img/
js/
Controller/
vendor/
composer/
Core/
pubic_html/
- index.php
Ué, it’s not just using the absolute path, and giving the proper permissions. You can also get to the file using "." to access the directory "above". It would be good to inform which framework is using
– mau humor
It’s my own zend-based framework. I’ve tried accessing paths with '.. ', with the absolute path, but it’s no use. It only works when I put the files inside public_html, which is not feasible because it disrupts my MVC. I know it’s possible because I’ve seen on other sites they accessing css and js files so that it wasn’t possible to click the link to view the content. I really want to find this solution to be able to publish on my blog and post in the communities because I know it is a very common question and by my researches, never solved openly.
– Samuel Dos Santos