<?php
$config = require __DIR__ . '/config.php';
try {
    $pdo = new PDO($config['db']['dsn'], $config['db']['user'], $config['db']['pass'], $config['db']['opts']);
} catch (PDOException $e) {
    die("DB Connection failed: " . $e->getMessage());
}