I'm including my header in every page of my site and I would like a way to dynamically make sure its always working without changing anything. I was using:
but since my site is in a sub domain it doesn't work. It works locally because its in the DocumentRoot but when I upload it to my remote site in the sub domain it skips over some of the folders because document_root only returns the address up to the DocumentRoot. Is there a better way to do this?PHP Code:$doc_root = $_SERVER['DOCUMENT_ROOT'];
include_once ("$doc_root/includes/header.php");






Bookmarks