|
Posted by Gary L. Burnore on 10/31/47 11:50
On 15 Jun 2006 20:23:33 -0700, "Puneet" <puneet.puneet@gmail.com>
wrote:
>Thanx Bent... That helped..
>I rewrote the code as :-
>print "Host port is :". $_SERVER ['SERVER_PORT'] ;
>
>and it worked...
>
>There has to be a space between SERVER and [.. otherwise PHP throws an
>exception.
>
Now if you could JUST STOP TOP POSTING.
>
>
>Bent Stigsen wrote:
>> 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
--
gburnore at DataBasix dot Com
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
Official .sig, Accept no substitutes. | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ 0 1 7 2 3 / Ý³Þ 3 7 4 9 3 0 Û³
Black Helicopter Repair Services, Ltd.| Official Proof of Purchase
===========================================================================
Navigation:
[Reply to this message]
|