I am in the Process of Building a PHP Application. The application itself has large number of pages and hence I decided to categorize each files into corresponding Subdirectories..
However I have encountered a problem. All the template resources folders(CSS,JS, Images etc) are located in the root folder
localhost/appname/. and also the Navigation Menu (
navmenu.php). I am including the menu in each page.
The Problem arises when I try to include the
navmenu.php inside the files in sub-directories.
ie when I include
index.php(Both in root folder) works great. But when i Include
navmenu.php in addstudent.php located in student subdirectory all the
a href links in navmenu.php becomes student/*.php (Relative Links)
What is the proper way to solve such Situations.. I have a configuration file which is included in all php files. How should I create a constant..
and how should I update the links in the
navmenu.php href links.
Thanks in Advance