<?php
require_once('globals.php');
class Database
{
private $db;
function __construct()
{
$this->db = null;
}
public function connect()
{
try
{
$this->db = new PDO(DB_SOURCE, DB_USER, DB_PASS);
$this->db->setAttribute(PDO::ERRMODE_EXCEPTION, true);
}
catch (Exception $exc)
{
return false;
}
return true;
}
public function get_handle()
{
return $this->db;
}
}
?>