Re: getting current page url
| From: | Richard Lynch | Date: | Sat, 29 Apr 2006 08:08:58 +0000 |
| Subject: | Re: getting current page url | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-235075@lists.php.net to get a copy of this message | ||
On Fri, April 28, 2006 6:21 am, Schalk wrote:
> Possibly a very simple question but here goes. How would I code the
> following in PHP?
>
> if(window.location ==
> (("http://www.epda.cc/index.php") ||
The closest moral equivalent to window.location in PHP is probably
$_SERVER['PHP_SELF']...
Actually, just var_dump($_SERVER) and pick out the key/value you like
best that suits your needs.
Other than a lot of ((excessive (parentheses))) the rest of it is
fine, I think...
Actually, I don't think you can use this:
$x === ($y || $z)
and have it mean what you want it to mean...
You'd want:
$x === $y || $x === $y
But I do know there are some funky things you can do with || that
aren't what I expect, so I could be wrong on this part.
--
Like Music?
http://l-i-e.com/artists.htm