]>
Commit | Line | Data |
---|---|---|
d8c46ff7 | 1 | <?php |
7a464f7d GJ |
2 | |
3 | function checkConfig() | |
4 | { | |
76b2600c | 5 | if (!file_exists(__DIR__ . '/../config.json')) { |
7a464f7d GJ |
6 | throw new Exception('Cant read settings file.', 500); |
7 | } | |
8 | try { | |
9 | $settings = json_decode( | |
76b2600c | 10 | file_get_contents(__DIR__ . '/../config.json'), |
7a464f7d GJ |
11 | true, |
12 | ); | |
13 | if ($settings['PHP_ERRORS']) { | |
14 | error_reporting(E_ALL); | |
15 | ini_set('display_errors', 1); | |
16 | } | |
17 | } | |
18 | catch (Exception) { | |
19 | throw new Exception('Cant populate settings.', 500); | |
20 | } | |
21 | } | |
22 | ||
23 | checkConfig(); | |
24 | /** | |
25 | * Uguu | |
26 | * | |
27 | * @copyright Copyright (c) 2022 Go Johansson (nokonoko) <neku@pomf.se> | |
28 | * | |
29 | * This program is free software: you can redistribute it and/or modify | |
30 | * it under the terms of the GNU General Public License as published by | |
31 | * the Free Software Foundation, either version 3 of the License, or | |
32 | * (at your option) any later version. | |
33 | * | |
34 | * This program is distributed in the hope that it will be useful, | |
35 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
36 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
37 | * GNU General Public License for more details. | |
38 | * | |
39 | * You should have received a copy of the GNU General Public License | |
40 | * along with this program. If not, see <https://www.gnu.org/licenses/>. | |
41 | */ | |
42 | require_once __DIR__ . '/../vendor/autoload.php'; | |
43 | ||
d5e2cc4c | 44 | use Pomf\Uguu\GrillLoader; |
7a464f7d GJ |
45 | |
46 | new GrillLoader(); |