Hi there, I'm trying to get the root directory of my site... But I don't want to edit the dots with slashes every time I make a new page in a directory inside another directory.. Any ideas? Here's an example tree :-)
-/ -/stuff --/stuff/lol.php -/lolwut --/lolwut/cake.php --/lolwut/pie.php
$_SERVER['DOCUMENT_ROOT'] will give you the root address.
Hmm.. It appears that didn't work, so I used $_SERVER["SERVER_NAME"], and it started working! Anyway, thanks for the help :)