19 lines
356 B
PHP
19 lines
356 B
PHP
|
<?php
|
||
|
|
||
|
require_once(__DIR__ . '/vendor/autoload.php');
|
||
|
|
||
|
$envFile = Dotenv\Dotenv::createArrayBacked(__DIR__)->load();
|
||
|
|
||
|
function env($key, $default = null) {
|
||
|
global $envFile;
|
||
|
|
||
|
if(isset($envFile[$key])) {
|
||
|
return $envFile[$key];
|
||
|
}
|
||
|
|
||
|
return $default;
|
||
|
}
|
||
|
|
||
|
header('Content-Type: text/html; charset=' . env("CHARSET"));
|
||
|
require_once(__DIR__ . '/index.html');
|