flash.moe/public/collection/_inc.php
2021-07-29 21:58:32 +00:00

24 lines
897 B
PHP

<?php
error_reporting(-1);
ini_set('display_errors', 'on');
date_default_timezone_set('utc');
mb_internal_encoding('utf-8');
try {
$pdo = new PDO('mysql:unix_socket=/var/run/mysqld/mysqld.sock;dbname=game-collection;charset=utf8mb4', 'game-collection', 'NwQKuxmZbW6a91lx9VUcbpcHFKi5UhrD', [
PDO::ATTR_CASE => PDO::CASE_NATURAL,
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,
PDO::ATTR_STRINGIFY_FETCHES => false,
PDO::ATTR_EMULATE_PREPARES => false,
PDO::MYSQL_ATTR_INIT_COMMAND => "
SET SESSION
sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION',
time_zone = '+00:00';
",
]);
} catch(Exception $ex) {
echo '<h3>Unable to connect to database</h3>';
die($ex->getMessage());
}