tildechan/core/database.php

12 lines
294 B
PHP

<?php
// Load in the database variables
$path = $_SERVER['DOCUMENT_ROOT'];
require($path . "/core/config.php");
// Connect to the database
$DB_CONN = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if (!$DB_CONN) {
die('Could not connect to the database host!' . mysql_error());
}
?>