Hey guys!
My current project has a default header and footer on each page. The default header is in a file ./includes/default_header.php. It includes the <TITLE></TITLE> tag and I am trying to set it by passing it the title of the page via $_GETS.
Here's my code:
define('IN_MYPROJECT', true);
$MyProj_root_path = './';
$MyProj_page_title = urlencode('Welcome to ProjectXYZ!');
include($MyProj_root_path . 'includes/default_header.php?title=') . $MyProj_page_title);
the define() is used as a flag to prevent outside includes etc.
When the $MyProj_root_path is set to './' I get an error saying the default_header.php file doesn't exist.
If I set the $MyProj_root_path to the absolute URI - 'http://www.domain.com/dir/' it fails to recognise the IN_MYPROJECT variable can doesn't load.
What gives? Any thoughts?
Cheers,
Clinton Greer
cggreer@it.uts.edu.au