Forum Moderators: coopster
Here is my problem...
On each page I include a script that controls the navigation elements of each page. Ex: inlcude("nav.php")
Within nav.php, I check the path of the page that included nav.php and write the appropriate submenu accordingly. For example, when nav.php is included from: www.mysite.com/bluewidgets/index.php it would find that it was included from a page in the "bluewidgets" section and write the appropriate submenu for bluewidgets.
I was accomplishing this by using $_SERVER["REQUEST_URI"] (within nav.php) to retrieve the path of the page that included nav.php. Since switching hosts $_SERVER["REQUEST_URI"] now returns the path of nav.php(includes/nav.php) and not the page that included nav.php. Does that make sense?
Here is the code I was using within nav.php...
$strArr = explode("/", $_SERVER["REQUEST_URI"]);
$directory = $strArr[sizeof($strArr) - 2];
switch ($directory) {
write appropriate menu...
}
Can anyone offer me some advice?
Thanks