Skip to content

Instantly share code, notes, and snippets.

@craiem
Last active December 15, 2015 10:39
Show Gist options
  • Save craiem/5247388 to your computer and use it in GitHub Desktop.
Save craiem/5247388 to your computer and use it in GitHub Desktop.
php -> if localhost
if(preg_match('/localhost/', $_SERVER['HTTP_HOST'])){
//DATOS OFFLINE
$dbname = "";
$ipserver = "localhost";
$usuariobase = "root";
$passbase = "root";
} else {
//DATOS ONLINE
$dbname = "";
$ipserver = "localhost";
$usuariobase = "root";
$passbase = "root";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment