Social-Network/config/config.php

18 lines
409 B
PHP
Raw Normal View History

<?php
ob_start(); // Starts the output buffering
session_start();
$timezone = date_default_timezone_set("America/New_York");
$env = parse_ini_file('.env');
$host = $env['DB_HOST'];
$user = $env['DB_USER'];
$pass = $env['DB_PASS'];
$db = $env['DB_NAME'];
$con = mysqli_connect($host, $user, $pass, $db);
if(mysqli_connect_errno()) {
echo "Failed to connect to database: " . mysqli_connect_errno();
}
?>