<?php
ob_start();
$this_file = str_replace('\\', '/', __File__) ;
$doc_root = $_SERVER['DOCUMENT_ROOT'];

$web_root =  str_replace (array($doc_root, "dir/dcon.php") , '' , $this_file);
$server_root = str_replace ('dir/dcon.php' ,'', $this_file);

define ('web_root' , $web_root);
define('server_root' , $server_root);

error_reporting(0);
date_default_timezone_set('Africa/Kigali');

//PDO Connection 
$db = new PDO('mysql:host=localhost;dbname=keyskrme_btn;charset=utf8', 'keyskrme_ubtn','Y$&JbQ7UeqcZ');
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$db->query('SET SESSION SQL_BIG_SELECTS=1');

//2and PDO CONNECTION

    $db_usn = 'keyskrme_ubtn';
	$db_pwd = 'Y$&JbQ7UeqcZ';
	$conn = new PDO( 'mysql:host=localhost;dbname=keyskrme_btn', $db_usn, $db_pwd );
	if(!$conn){
		die("Fatal Error: Connection Failed!");
	}
	
ob_end_flush();
?>

