diff options
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']); |
