Query bout Headers
Posted: Thu Nov 27, 2008 9:15 am
Hi I've just been working on a site and I've got 2 different headers and want one of them to load up with the index page, and another that loads up with every other page, so I was just wondering if there was an if statement I could write for it to work. Something along the lines of
All subpages run to pages like "index.php?s=about" and things like that, so whats above doesn't work as I'd like it to. Is there any way of setting it up so it'd run as something like
if the path is only index.php (an exact reference only) then it runs header-index.php, otherwise it runs just header.php.
Is there anything like that that'd work with it ? I've been trying to a while and can't get it to work, but its the last piece of the puzzle to finish off the site and I can't do it, please can anybody help.
Code: Select all
if($Path="index.php")
{
require('header-index.php');}
else
{
require('header.php');}
if the path is only index.php (an exact reference only) then it runs header-index.php, otherwise it runs just header.php.
Is there anything like that that'd work with it ? I've been trying to a while and can't get it to work, but its the last piece of the puzzle to finish off the site and I can't do it, please can anybody help.