PDA

View Full Version : Couple of PHP Commands Don't Seem to Work



Darin
August 7th, 2001, 16:15
I'm having troubles with a couple of PHP commands I'm trying to execute when someone encounters an error page. They don't display nothing. Here they are:

First one, URL of the file they tried to access:


<? "$REQUEST_URL"; ?>


Second one, where they arrived from:


<? "$REDIRECT_URL"; ?>


Both of these don't show anything. No errors, but no result either. Any help would be greatly appreciated.

niv
August 7th, 2001, 16:19
You want to display them? You need echo! :rolleyes::D



<? echo $REQUEST_URL; ?>


and



<? echo $REDIRECT_URL; ?>

Darin
August 7th, 2001, 16:21
Uhmm yeah, I've tried that first, doesn't work. It just displays the text like "REDIRECT_URL".

Darin
August 7th, 2001, 16:26
This one seems to work...kind of. Doesn't display what URL you came from, but it displays the URL of my error page:



<? echo $HTTP_REFERER; ?>


Still absolutely nothing with:


<? echo $REQUEST_URL; ?>

niv
August 7th, 2001, 16:28
Originally posted by Darin
Uhmm yeah, I've tried that first, doesn't work. It just displays the text like "REDIRECT_URL".

that's because you're not supposed to put quotes around it...

maybe they're not supported in that version? try digging up the PHP CHM-manual @ www.php.net

Darin
August 7th, 2001, 16:38
I removed the quotes...I don't know why I had them in the first place. Anyways the REQUEST_URL command still doesn't work and I couldn't find anything on the PHP Manual.

jw
August 7th, 2001, 17:06
Its $REQUEST_URI thats an I, not an L

Darin
August 7th, 2001, 17:12
Thank you!! :classic2: