Re: getting current page url

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux