NYCPHP Meetup

NYPHP.org

[nycphp-talk] $_server['server_name'] versus $_server[http-host']

Cliff Hirsch cliff at pinestream.com
Thu Mar 16 13:23:35 EST 2006


'SERVER_NAME' -- The name of the server host under which the current
script is executing. If the script is running on a virtual host, this
will be the value defined for that virtual host. 

'HTTP_HOST' -- Contents of the Host: header from the current request, if
there is one. 

So in English that means? Aren't these the same thing?

If I have several URLs points at the same server and want to setup my
links to refer to the URL that was originally submitted, does this mean
I should be using http_host, not server_name?

Cliff




More information about the talk mailing list