Файл: public_html/system/inc/db.php
Строк: 14
<?php
/**********************************
* @package: PerfCMS *
* @year: 2012 *
* @author: Artas *
* @link: http://perfcms.net *
* ------------------------------- *
* @package: PerfCMS Ultra *
* @year: 2013 *
* @author: wanya26ua & Tesla *
* @link: http://perfclub.ru *
**********************************/
$dbc = parse_ini_file(SYS .'/ini/db.ini');
try {
$db = new PDO('mysql:dbname='.$dbc['base'].';host='.$dbc['host'], $dbc['user'], $dbc['pass']);
} catch (PDOException $e) {
echo 'Connection failed: ' . $e->getMessage();
}
$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
$db->query("SET NAMES utf8");