flash.moe/public/collection/_inc.php

25 lines
888 B
PHP
Raw Normal View History

2020-08-20 00:02:37 +00:00
<?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=flash_collection;charset=utf8mb4', 'flash', 'af66a6666b1c9a597063325b14c8b52d', [
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());
}