Jump to content

[SOLVED] $_SERVER['HTTP_HOST'] Problem.


Vermillion

Recommended Posts

Hi guys. I am having a weird problem here:

 

Can someone tell me why when I do this:

 

'<a href="'.$_SERVER['HTTP_HOST'].'/login/">Login</a>'

 

The link becomes this?:

 

http://www.projectawings.com/www.projectawings.com/login/

 

That really shouldn't be happening, I should only see:

 

www.projectawings.com/login/

 

or

 

http://www.projectawings.com/login/

 

It happens on my localhost as well. it does:

 

http://localhost/localhost/login/

 

I really want to find a solution to this one :(. Any help will be appreciated!

Link to comment
https://forums.phpfreaks.com/topic/156376-solved-_serverhttp_host-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.