Jump to: navigation, search

PHP CURRENT HOST

From w3cyberlearnings

Contents

PHP CURRENT HOST or Domain

Get the CURRENT Host or Domain.

Example

<?php
  // http://www.w3cyberlearnings.com/Learning_PHP
  echo $_SERVER['HTTP_HOST'];
?>

Output

  www.w3cyberlearnings.com

Related Links

Manage URL
  1. PHP CURRENT URL
  2. PHP CURRENT HOST
  3. PHP URL Parameters
  4. PHP URL PROTOCOL
  5. PHP URL Script Name
  6. PHP FULL URL
  7. PHP URL Parent Directory
Navigation
Web
SQL
MISC
References