Skip to content

Instantly share code, notes, and snippets.

@trey
Created February 15, 2012 23:28
Show Gist options
  • Save trey/1840023 to your computer and use it in GitHub Desktop.
Save trey/1840023 to your computer and use it in GitHub Desktop.
Host name switching in PHP
<?php
switch($_SERVER['HTTP_HOST'])
{
case 'something.dev':
case 'something-else.dev':
// Development settings
break;
case 'something.com':
// Staging settings
break;
default:
// Production settings
}
?>
@trey
Copy link
Author

trey commented Feb 16, 2012

@akuzemchak I updated my snippet to your code. :) Thanks.

@akuzemchak
Copy link

Yay! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment