Portal Home > Knowledgebase > Articles Database > $_SERVER['PHP_SELF']
|Posted by Goldfiles, 04-15-2008, 01:47 AM|
|I've been using $_SERVER['PHP_SELF'], but to get the filename of the current page like "/index.php", but how can I get the other URL information?
Such as, http://www.website.com/index.php?id=5
I want to collect "/index.php?id=5" just like that. Is there a way to do this?
|Posted by Goldfiles, 04-15-2008, 01:49 AM|
|Is it $_SERVER['REQUEST_URI']?
|Posted by zacharooni, 04-15-2008, 02:02 AM|
|I think you mean something like:
|Posted by Goldfiles, 04-15-2008, 03:19 AM|
|Not exactly. The REQUEST_URI actually worked for me. I was trying to capture a big chunk of the address bar as a string.
|Posted by jimpoz, 04-15-2008, 03:22 PM|
|To see all the server variables available to you:
|Posted by zacharooni, 04-15-2008, 04:13 PM|
|I also think this might help:
Add to Favourites Print this Article