$_Server this domain predefined variable?

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

Post Reply
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

$_Server this domain predefined variable?

Post by JAB Creations »

Is there a $_Server predefined variable that when echoed on a domain such as 'ilikeapplesalot.com' will echo out 'ilikeapplesalot.com'?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

HTTP_HOST
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Something that might help you see what is in the $_SERVER superglobal for your machine you are working on is:

Code: Select all

<?php
echo '<pre>', print_r($_SERVER, true), '</pre>';
?>
Post Reply