I find it difficult to make a single configuration file (responsible for __autoload
) be used by both the files that are in the root and those in the admin
folder.
The root directory contains the folders app
, public
and admin
. The app
folder contains the configuration file and the model , view and controller directories.
In the admin folder I want to keep a similar structure with an app folder containing controller and view
The intent is to make files within admin/app/controller
access classes through the configuration file contained in raiz/app
and this is the only file responsible for including classes. For this, I used the root , raiz/app
velop and raiz/app/model
folders via set_include_path()
( I use XAMPP).
Well, if the file is calling the class it's in root , or in raiz/app/controller
, the class is instantiated, but nothing works in raiz/admin
, or raiz/admin/app/controller
.
In order to understand how I was doing, I had a configuration file for each folder, as well as an app , model in> and view for each application (horrible for maintenance) and it worked.