I have the following file structure:
/
+--- inc/
| +--- lib1.php
+--- inc2/
| +--- lib2.php
| +--- view2.php
+--- view1.php
Both view1.php and view2.php files include lib2.php. Lib2.php includes lib1.php. Graphic:
View1.php ---\
+---> Lib2.php ---> Lib1.php
View2.php ---/
However, I cannot get this to work because the search paths are unstable. If I try to include "../lib1.php", then only view2.php works. If I try to enable "inc / lib1.php", then only view1.php works. In another view, it always complains that the file was not found.
What should be the right way to handle this?
Vilx- source
share