what is the difference between $_SERVER['REQUEST_URI'] and $_GET['q'] (which is used in Drupal)?
$_SERVER['REQUEST_URI']
$_GET['q']
Given this example url:
http://www.example.com/some-dir/yourpage.php?q=bogus&n=10
$_SERVER['REQUEST_URI'] will give you:
/some-dir/yourpage.php?q=bogus&n=10
Whereas $_GET['q'] will give you:
bogus
In other words, $_SERVER['REQUEST_URI'] will hold the full request path including the querystring. And $_GET['q'] will give you the value of parameter q in the querystring.
q
1.4m articles
1.4m replys
5 comments
57.0k users