Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Currently I am doing php inclusion for my header in all pages.

<?php
include "../../common/header/header.php";
?>


Above path changes for other page, for eg.
PHP
<?php
include "../common/header/header.php";
?>


My header includes navigation links to other pages named as: About, Contact Us and Help with a CSS file for itself.

With the above approach, navigation links to pages(About.php,Contactu.phps, help.php) included in the header remains static when header is referenced in other web pages with the include statement. Thus, a 404 not found error occurs.
My directory structure is a tree view and for every web page relative path to the header changes, how can I give links to pages(about.php,contactus.php,help.php) in header itself so that it work on inclusion of the header in any page in the tree structure?
Posted

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900