<?php
	define('SITEDIR', realpath($_SERVER["DOCUMENT_ROOT"]));
	require_once('class.environment.php');
	$__DotEnvironment = new DotEnvironment(SITEDIR."/.env");

	define('USER', $_ENV['USER']);
	define('PASSWORD', $_ENV['PASSWORD']);
	define('HOST', $_ENV['HOST']);
	define('DATABASE', $_ENV['DATABASE']);

	try {
		$connection = new PDO("mysql:host=".HOST.";dbname=".DATABASE.";charset=utf8mb4;", USER, PASSWORD);
	} catch(PDOException $e) {
		exit("ERROR: " . $e->getMessage());
	}

    include('functions.php'); 
?>