$_SERVER[’SCRIPT_NAME’ issues
-
Hello,
I am trying to combine dynamic menus (described so well in the codex) with another level of functionality that involves specifying a different php file for each top level page (which contain the subpages). Sounds complicated, well here’s an example of how it should look: http://www.bipcorporate.com
What I don’t seem to be able to work out is how to specify a specific php rule. This is what I’ve worked out so far:
<?php
if ($_SERVER[’SCRIPT_NAME’]='/about') {
include( TEMPLATEPATH . '/nav/about.php');
}
elseif ($_SERVER[’SCRIPT_NAME’]='/contact') {
include( TEMPLATEPATH . '/nav/contact.php');
}
else {
include( TEMPLATEPATH . '/nav/home.php');
}
?>But it doesn’t work.
Any ideas?
Thanks,
Neil
- The topic ‘$_SERVER[’SCRIPT_NAME’ issues’ is closed to new replies.