1
0
www.mikescher.com/www/internals/backend.php

12 lines
359 B
PHP
Raw Normal View History

2017-10-29 18:52:46 +01:00
<?php
$CONFIG = require 'config.php';
$dsn = "mysql:host=" . $CONFIG['host'] . ";dbname=" . $CONFIG['database'] . ";charset=utf8";
$opt = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false,
];
$PDO = new PDO($dsn, $CONFIG['user'], $CONFIG['password'], $opt);