Jump to content


Photo

page needs to read directory structure


  • Please log in to reply
1 reply to this topic

#1 ztkirby

ztkirby
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 17 June 2006 - 03:02 AM

I'm creating a php/mysql site template. I need the template to recognize the 1st and 2nd level directories so that it knows which submenu to pull from the db as well as which submenu option to highlight.

For example, if the page is located at domain.com/about/vision, it will need to get the about submenu from the db and highlight the vision menu item.

Any help you can provide is much appreciated!

#2 ztkirby

ztkirby
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 17 June 2006 - 06:12 AM

So, the code that I am using is:
$curLoc = explode('/', $REQUEST_URI);
print_r($curLoc);
This returns:
 Array
        (
            [0] => 
            [1] => about
            [2] => vision
            [3] => test.php
        )
seems to work okay.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users