[pmwiki-devel] Getting URL
dso
dso at moosoft.com
Mon Dec 4 15:53:26 CST 2006
err, that should be $_SERVER["SERVER_NAME"] not REMOTE_HOST
Daniel
dso wrote:
> What about $_SERVER["REMOTE_HOST"] and $_SERVER["REQUEST_URI"] and then
> you'd need to add http:// and it should be a full url. I think :)
>
> Daniel
>
> The Editor wrote:
>>> The Editor wrote:
>>>> I'm doing some work in a few new areas I know nothing about. Again.
>>>> :) but I'm having fun as I go. Will write more later perhaps... But
>>>> have one php question.
>>>>
>>>> Suppose I call a php script in my browser. Is there a way to get the
>>>> full url in the script? It's probably a simple function, but I can't
>>>> find it. I've looked at get_headers() but it requires the URL as a
>>>> parameter!
>>>>
>>>> Any suggestions would be appreciated.
>>>>
>>>> Cheers,
>>>> Caveman
>>
>> On 12/4/06, dso <dso at moosoft.com> wrote:
>>> I think the global variable $_SERVER["REQUEST_URI"] contains the URL.
>>>
>>> Daniel
>>
>> Thanks! That helps... But it's only the path to the script, not the
>> domain or anything. I'd like to be able to dynamically reconstruct
>> the full url without having to set it in a config file.
>>
>> Cheers,
>> Caveman
>
>
>
> _______________________________________________
> pmwiki-devel mailing list
> pmwiki-devel at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-devel
More information about the pmwiki-devel
mailing list