PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
nmotion
Forum Commoner
Posts: 32 Joined: Wed Jan 22, 2003 6:53 am
Post
by nmotion » Tue Jun 17, 2003 2:21 pm
Can find this anywhere...
I have different domain names on the same server. How do I detect which url is being used to see the page.
bjg
Forum Newbie
Posts: 15 Joined: Tue Jun 10, 2003 9:42 am
Location: .au
Post
by bjg » Tue Jun 17, 2003 3:08 pm
$_SERVER['HTTP_HOST']
twigletmac
Her Royal Site Adminness
Posts: 5371 Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK
Post
by twigletmac » Wed Jun 18, 2003 4:11 am
You can find lots of useful things by doing:
Code: Select all
echo '<pre>';
print_r($_SERVER);
echo '</pre>';
Mac
cactus
Forum Regular
Posts: 343 Joined: Tue Jun 10, 2003 4:16 am
Location: UK
Post
by cactus » Wed Jun 18, 2003 5:24 am
Additionally, the use of
phpinfo() to determine the superglobals elements is recommended, but may be disabled on some shared hosting systems
Regards,