How do I get the value of an URL eg. www.example.php/folders/crowd? I\'m trying to echo out crowd with PHP. I have tried using the $_SERVER [\'SCRIPTNAME\
www.example.php/folders/crowd
$_SERVER [\'SCRIPTNAME\
To get the current directory of the file (which is just "crowd" in your "www.example.php/folders/crowd" example), use:
$cur_dir = basename(dirname($_SERVER[PHP_SELF]))
If you just want the file, then try this:
$cur_file = $_SERVER[PHP_SELF];