Re: Retrieve URL of website
| From: | Zareef Ahmed | Date: | Sat, 02 Apr 2005 03:07:55 +0000 |
| Subject: | Re: Retrieve URL of website | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-212069@lists.php.net to get a copy of this message | ||
HI,
Look for $_SERVER['REQUEST_URI'];
<?php
print $_SERVER['REQUEST_URI'];
?>
But Dear first you should search the documentation , it is very easy
to notice if you can use phpinfo();
zareef ahmed
On Apr 2, 2005 8:12 AM, HarryG <harry1980@gmail.com> wrote:
> Hi,
>
> I want to retrieve the complete url in my php script. How can I do this?
>
> eg. www.mysite.com/mydirectory/mypage.php
>
> Result should either be www.mysite.com/mydirectory/mypage.php or /mydirectory/mypage.php
>
> Thanks in advance
> HarryG
>
--
Zareef Ahmed :: A PHP Developer in India ( Delhi )
Homepage :: http://www.zareef.net