I have a secondarynav.inc file that I am using to swap all secondary nav's at the top of my page. For example, when a user accesses /services/ the main secondarynav.inc file loads the .inc associated to that section. All I want to do is include a specific file for each specific folder level, that's all.
Here's what I have so far. I don't get an error message as the echo displays the message below. And this is what I have inside the main include file "subpagenav.inc" when I attempt the switch but nothing happens except the echo display...
<?php
// Services Subnav
if ($URL['http://www.mydomain.com/services'] {
include ($SERVER['DOCUMENT_ROOT'] . '/services/include/servicesnav.inc');
}
// Resources Subnav
elseif ($URL['http://www.mydomain.com/resources'] {
include ($SERVER['DOCUMENT_ROOT'] . '/resources/include/resourcesnav.inc');
}
else {
echo ("This file does not exist!");
}
?>
Any help on this is greatly appreciated. I have searched google/yahoo/phpbuilder, etc for hours and hours and couldn't find anything.
Thanks very much -
grafix