summaryrefslogtreecommitdiff
path: root/lib/config.php
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-12-06 16:03:44 +0500
committerilotterytea <iltsu@alright.party>2025-12-06 16:03:44 +0500
commit880776528c0acf361ee06b8a5ec6c4071c329d7f (patch)
treec28600a0d369860ac1f0849b1fac7c04723ec4b1 /lib/config.php
initial commit
Diffstat (limited to 'lib/config.php')
-rw-r--r--lib/config.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/config.php b/lib/config.php
new file mode 100644
index 0000000..6481767
--- /dev/null
+++ b/lib/config.php
@@ -0,0 +1,9 @@
+<?php
+$config = [];
+
+$file_path = "{$_SERVER['DOCUMENT_ROOT']}/config.ini";
+if (file_exists($file_path)) {
+ $config = parse_ini_file($file_path, true);
+}
+
+define('INSTANCE_NAME', $config['instance']['name'] ?? $_SERVER['HTTP_HOST']); \ No newline at end of file