Location: PHPKode > projects > GMFoto > user/00000/index.php
<?php 

function GM_root ( $break, $seperator = '/' ) {
  $dir = str_replace ( '\\' , $seperator , realpath(dirname(__FILE__))); // current directory ##
  $explode = explode( $seperator, $dir ); // break into array at seperator ##
  $count = count ($explode); // count items in array ( - x gives folder depth ) ##
  $key = array_search( $break , $explode ); // find break key ## 
  $user = $explode[$key+2]; // get user ID ##
  $slice = array_slice( $explode, 0, $key+1 ); // slice unrequired keys ##
  $implode = implode( $seperator, $slice ); // return array to string, adding seperators ##
  if ( (strlen( $implode )-1) != '/' ) { $implode .= '/'; } // add trailing slash, if missing ##
  return $root = array ( $implode, $user, $count, $explode, $dir ); // return array ##
}

$root = GM_root ( 'loveunit_com' ); // run function ##
include $root[0]."code/html.php"; // include code ##

?>
Return current item: GMFoto