Page 1 of 1

$_SERVER['REQUEST_URI'] Not Working

Posted: Wed Jun 14, 2006 4:55 pm
by AliasBDI
I have a page where I am trying to grab the URL and explode it into arrays. But the $_SERVER['REQUEST_URI'] returns nothing. Here is my code:

Code: Select all

<?php
$req = $_SERVER['REQUEST_URI'];
echo $req;
?>
What should I do?

Posted: Wed Jun 14, 2006 5:15 pm
by bokehman
This is a server issue. If it is not there it is because the server is not passing it to PHP. You could always try a combination of $_SERVER['HTTP_HOST'] and $_SERVER['PHP_SELF'].