S2OJ/uoj/1/app/models/UOJConfig.php

17 lines
452 B
PHP
Raw Permalink Normal View History

2016-11-17 02:08:31 +00:00
<?php
class UOJConfig {
public static $data;
public static function mergeConfig($extra) {
mergeConfig(self::$data, $extra);
}
}
if (is_file($_SERVER['DOCUMENT_ROOT'].'/app/.config.php')) {
UOJConfig::$data = include $_SERVER['DOCUMENT_ROOT'].'/app/.config.php';
UOJConfig::mergeConfig(include $_SERVER['DOCUMENT_ROOT'].'/app/.default-config.php');
} else {
UOJConfig::$data = include $_SERVER['DOCUMENT_ROOT'].'/app/.default-config.php';
}