Re: How to Get URL?

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

 



Labunski wrote:

How to get url of the page the php script is on?

In other words, I want to know whether I'm in page "news.php" or in "posts.php", or in some other page. Is there any simple way to get tis info?


Thanks,
Lab.




if (basename($_SERVER['PHP_SELF']) == 'news.php')
{
   // do whatever you want
}

-- 
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