Hi,
I've succesfully used the $PHP_SELF variable in some of my code. What i'd really like is a variable that outputs the current path that the user is in, for instance if accessing www.example.com/dir/subdir/index.php it would output either www.example.com/dir/subdir or /dir/subdir.
Is there such a thing?
$_SERVER[DOCUMENT_ROOT] i think
Originally posted by jonsof $_SERVER[DOCUMENT_ROOT] i think
That should get you started anyway, as far as /dir. It might not get you to /dir/subdir. Check the manual, I think the server var is "basepath" or "basename".....
dirname ($PHP_SELF) does the trick