FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » When is it possible for $_SERVER['SERVER_NAME'] to contain something other than the URL which actvated the script?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: When is it possible for $_SERVER['SERVER_NAME'] to contain something other than the URL which actvated the script? [message #179857 is a reply to message #179852] Wed, 12 December 2012 13:27 Go to previous messageGo to previous message
Scott Johnson is currently offline  Scott Johnson
Messages: 196
Registered: January 2012
Karma:
Senior Member
On 12/11/2012 11:25 PM, Tony Marston wrote:

>> You may try phpinfo() to get the full list of data/variables set by
>> your server. Some here may ask for that info to help you further.
>
> The output from phpinfo() looks perfectly normal and correct. It shows
> the expected values for SERVER_NAME and HTTP_HOST.
>

If you are getting the right value in SERVER_NAME and HTTP_HOST using
phpinfo() but are then getting a different value when you use the same
variable in your script, then you have an error in your script.

You may somewhere be setting the variables when you think you may be
comparing them.

if(SERVER_NAME = 'blabla')... set

if(SERVER_NAME == 'blabla')... compare
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Recommendations for PHP Chart generation?
Next Topic: Printing out or displaying for debugging
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Dec 02 17:09:03 GMT 2024

Total time taken to generate the page: 0.05885 seconds