| 
 Posted by Bent Stigsen on 06/19/55 11:50 
Puneet wrote: 
 
> Nope.. If i use your code.. then I am getting this.. 
>  
> PHP Notice: Undefined index: HTTP_HOST in C:\Program Files\Apache 
> Group\Apache2\htdocs\_debug_tmp.php on line 5 
 
Then it is (probably) not present in the http-request. Blame your 
browser/proxy. 
 
Perhaps you can use 'SERVER_NAME' instead. 
 
 
> If i use 
> Print "Host is : $_SERVER ['HTTP_HOST']"; 
 
Wouldn't work. When using an array inside an string, you will need the curly 
brackets to tell PHP to use the index. 
 
> The I am getting.. 
> Host is : Array ['HTTP_HOST'] 
 
Since the index is not used, it just tells you that $_SERVER is an array.  
 
 
[snip] 
 
 
--  
/Bent 
 
PS: please don't top post
 
  
Navigation:
[Reply to this message] 
 |