How can i get it so a variable is the folder of which the viewed page is in? such as if it were here, it would be "board"
do you mean MANUALY specify the location into a variable or do you mean have PHP automatically detect where it is? if yer talking manualy then it's just $board = "/var/www/board" would this work the same way? string $board = "/var/www/board"
<? $gDir = explode('/',$_SERVER['PHP_SELF']); $gDir = array_reverse($gDir); ?>
Fleahh!
<? $gDir = explode('/',$_SERVER['PHP_SELF']); $gDir = array_reverse($gDir); echo $gDir[1]; ?>
that code doesn't work on my computer. it says parsing error on this line: $gDir = explode('/',$_SERVER['PHP_SELF']);
I tried the code on mine and it worked, so you may need to change $_SERVER to $HTTP_SERVER_VARS