diff options
| author | ilotterytea <iltsu@alright.party> | 2025-10-14 15:36:31 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-10-14 15:36:31 +0500 |
| commit | 33fd114a314212b8759b525fb9e08d4ff4ca8869 (patch) | |
| tree | 7abbb155a7515148f355b30978e3a0fa77913fd1 /web/config.php | |
| parent | d6196a61348dbd0040e332147ef4a34ade64b309 (diff) | |
feat: web frontend
Diffstat (limited to 'web/config.php')
| -rw-r--r-- | web/config.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/web/config.php b/web/config.php new file mode 100644 index 0000000..bee8597 --- /dev/null +++ b/web/config.php @@ -0,0 +1,12 @@ +<?php +$file_path = $_SERVER['FILEPATH_CONFIG'] ?? ($_SERVER['DOCUMENT_ROOT'] . '/../config.ini'); + +$c = parse_ini_file($file_path, true) ?: []; + +// INSTANCE +define('INSTANCE_NAME', $c['instance']['name'] ?: $_SERVER['HTTP_HOST']); + +// DATABASE +define('DB_URL', "{$c['database']['driver']}:dbname={$c['database']['name']};host={$c['database']['host']}"); +define('DB_USER', $c['database']['user']); +define('DB_PASS', $c['database']['pass']); |
