Page 1 of 1

detecting php file

Posted: Wed Jul 11, 2007 8:25 am
by psurrena
I want to use a different background image on certain pages. How do I detect the /greatpage.php? Basically what HTTP_REFER leaves out.

Posted: Wed Jul 11, 2007 11:17 am
by Gente
HTTP_REFERER shows the last page you browsed.
What about PHP_SELF or REQUEST_URI?

Posted: Wed Jul 11, 2007 3:00 pm
by feyd
__FILE__ is probably better to use. It's certainly safer than PHP_SELF.

Posted: Thu Jul 12, 2007 3:49 am
by Gente
feyd wrote:__FILE__ is probably better to use. It's certainly safer than PHP_SELF.
Yes. But only if we don't use mod_rewrite.

Posted: Thu Jul 12, 2007 6:51 am
by feyd
Gente wrote:Yes. But only if we don't use mod_rewrite.
With mod_rewrite, one is on their own as they should be able to figure it out. ;)