Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. Well I've done it using this function: <?php function public_base_directory() { //get public directory structure eg "/top/second/third" $public_directory = dirname($_SERVER['PHP_SELF']); //place each directory into array $directory_array = explode('/', $public_directory); return $directory_array[1]; } ?> It seems to work OK, but will have to see if I run into any problems with it later.
  2. Is there a way of extracting (separating out) the information from $PHP_SELF ?
  3. Does anyone know how you would do this with two active states? i.e. I'm using genres: so film/action is an example. What I think I need to be able to do is detect the (directory) level higher as well as the current level... So if you're on film/action(/index.php) both film and action would be the active states. Is this going to be possible? Cheers, Theo.