$_SERVER['HTTP_HOST'] and $_SERVER['SERVER_NAME']are different in my
circumstance,I found that the $_SERVER['SERVER_NAME']is the same with the
"ServerName" value you set in httpd.conf.




                                                                                       
      
                    "Ivo Fokkema"                                                      
      
                    <I.F.A.C.Fokkem       收件人:     [EMAIL PROTECTED]             
                    [EMAIL PROTECTED]>            抄送:                               
              
                                          传真致:                                     
      
                                          主题:  [PHP] Difference between equal 
$_SERVER    
                                           variables?                                  
      
                    2003-07-24                                                         
      
                    16:20                                                              
      
                                                                                       
      
                                                                                       
      






Hi list,

Just out of curiosity I would like to know if anyone can tell me the
difference between some $_SERVER variables that generate the same output
(in
my test-file at least).

For instance, what is the difference between $_SERVER['HTTP_HOST'] and
$_SERVER['SERVER_NAME']? Can they generate different output under some
circumstances? They're always the same with me. Any recommendations on
which
to use?

I know that $_SERVER['REQUEST_URI'] can differ from 'SCRIPT_NAME' and
'PHP_SELF' (I use 'REQUEST_URI' to see what people were looking for when
they hit a 404) but can $_SERVER['SCRIPT_NAME'] and $_SERVER['PHP_SELF'] be
different?

TIA,


--
Ivo Fokkema
PHP & MySQL programmer
Leiden University Medical Centre
Netherlands



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to