I have the following folder structure:
+myproject
|
|_models
| |_signIn_model.php
|_views
|_controllers
| |_ signin.php
|
|_ index.php
--------------------------------------------------------
when i am inside 'controllers/signin.php' and i use __autoload function to include the php class files inside other folders such as 'signIn_model.php' , it fails since both files are not in the same folder, i was looking for a way that __autoload function can find the other class automatically and include it or maybe some sort of global path that can find all the other classes so that i don't need to write several lines of include on top of each page.
Please help me out with this issue, thanks a lot in advance.
+myproject
|
|_models
| |_signIn_model.php
|_views
|_controllers
| |_ signin.php
|
|_ index.php
--------------------------------------------------------
when i am inside 'controllers/signin.php' and i use __autoload function to include the php class files inside other folders such as 'signIn_model.php' , it fails since both files are not in the same folder, i was looking for a way that __autoload function can find the other class automatically and include it or maybe some sort of global path that can find all the other classes so that i don't need to write several lines of include on top of each page.
Please help me out with this issue, thanks a lot in advance.