$_SERVER['REQUEST_URI'] returns URI of the include rather than the including page

I’m working on a web app using PHP include to maintain navigation. I’d like to be able to set the current page link in the navigation as “Active” on each page. I’ve written a script to do this using the URI of the page on which the menu is displayed, e.g. “index.php.” However, when I use $pagename = ($_SERVER[‘REQUEST_URI’]); to set a variable with the URI the returning URI is the URI of page being included, e.g. “menu.php,” rather than the page on which the menu is displayed. This code works as expected on one host, but not on the host I’m currently using. Suggestions?

do not include via http.

Thanks for the hint. That fixed it…

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.