Вход Регистрация
Файл: system/inc/db.php
Строк: 34
<?php
/**
 * Licensed under The MIT License
 * For full copyright and license information, please see the LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright (c) 2013, Taras Chornyi, Sergiy Mazurenko, Ivan Kotliar
 * @link          http://perf-engine.net
 * @package       PerfEngine
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
 */
$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_MODEPDO::FETCH_ASSOC);
$db->query("SET NAMES utf8");
Онлайн: 0
Реклама