While addressing include or include_once functions in our php files giving the correct address might be challenging.
For example if you are putting your header and footer files with a separate php file to all other pages, you should add them as include_once 'header.php'; .
Use the following code to get the root address for your files and add header or any page you need related to this root address.