game/_incl_data/__config.php

39 lines
894 B
PHP
Raw Normal View History

2022-06-07 00:30:34 +03:00
<?php
2022-12-20 03:57:09 +02:00
use Core\Config;
//error_reporting(E_ALL);
2022-06-07 00:30:34 +03:00
date_default_timezone_set('Europe/Moscow');
2022-12-19 20:26:14 +02:00
header('Cache-Control: no-cache, no-store, must-revalidate');
header('Pragma: no-cache');
header('Expires: 0');
2022-06-07 00:30:34 +03:00
2022-12-19 20:26:14 +02:00
require_once 'mysql_override.php';
2022-06-07 00:30:34 +03:00
2022-12-19 20:26:14 +02:00
// Попробуем в автозагрузку.
// Никогда не заработает с такими названиями классов и файлов!
// "На потом."
spl_autoload_register(function ($className) {
# 1 with namespaces
# 2 without
$fileName = [
__DIR__ . '/class/' . str_replace('\\', '/', $className . '.php'),
2023-07-31 20:06:51 +03:00
__DIR__ . '/class/' . $className . '.php',
];
2022-12-19 20:26:14 +02:00
foreach ($fileName as $file) {
if (file_exists($file)) {
require_once $file;
break;
}
}
});
2022-12-19 20:26:14 +02:00
$code = '1';
2022-12-20 03:57:09 +02:00
Config::init();
$c = Config::get();
//Tournament::startAllBattles();
2022-12-19 22:16:24 +02:00