Last active
December 15, 2015 10:39
-
-
Save craiem/5247388 to your computer and use it in GitHub Desktop.
php -> if localhost
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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