You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
701 B
PHP
28 lines
701 B
PHP
<?php
|
|
|
|
/*
|
|
* To change this license header, choose License Headers in Project Properties.
|
|
* To change this template file, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
|
|
require_once __DIR__ . "/settings.php";
|
|
|
|
require_once __DIR__ . "/vendor/autoload.php";
|
|
|
|
use Medoo\Medoo;
|
|
|
|
$database;
|
|
try {
|
|
$database = new Medoo([
|
|
'database_type' => DB_TYPE,
|
|
'database_name' => DB_NAME,
|
|
'server' => DB_SERVER,
|
|
'username' => DB_USER,
|
|
'password' => DB_PASS,
|
|
'charset' => DB_CHARSET
|
|
]);
|
|
} catch (Exception $ex) {
|
|
header('HTTP/1.1 500 Internal Server Error');
|
|
die("Database error. Try again later. (" . $ex->getMessage() . ")");
|
|
} |