Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding the HTTP_HOST...

Status
Not open for further replies.

Bammy217

Programmer
Sep 28, 2002
74
BE
Heya folks.... I seem to have a problem with some code....

I want it to fill up this string :

$BASE_URL = "
Can anyone tell me what I'm doing wrong??

D.

We never fail, we just find that the path to succes is never quite what we thought...
 
What PHP version are you using?

After 4.1.0 use:
$_SERVER[SERVER_NAME];

Before 4.1.0 use
$HTTP_SERVER_VARS[SERVER_NAME];

It is best to use the $_SERVER array than relying on deprecated vars such as $PHP_SELF and $HTTP_HOST.

This way your code will be portable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top