Created
January 15, 2018 00:52
-
-
Save wichaksono/8a3d839295b23f2974d814ba28277dd3 to your computer and use it in GitHub Desktop.
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
<?php | |
define('DBHOST', 'localhost'); | |
define('DBUSER', 'root'); | |
define('DBPASS', ''); | |
define('DBNAME', 'bootstrap'); | |
/** | |
* $dbconnect : koneksi kedatabase | |
*/ | |
$dbconnect = new mysqli(DBHOST, DBUSER, DBPASS, DBNAME); | |
/** | |
* Check Error yang terjadi saat koneksi | |
* jika terdapat error maka die() // stop dan tampilkan error | |
*/ | |
if ($dbconnect->connect_error) { | |
die('Database Not Connect. Error : ' . $dbconnect->connect_error); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment