decide.nolog.cz/api/utils/get-config.php

14 lines
308 B
PHP
Raw Normal View History

<?php
// returns config as associative array
function getConfig($path = '') {
$defaultConfig = include $path . 'config.default.php';
if (!is_file($path . 'config.php')) {
return $defaultConfig;
}
$userConfig = include $path . 'config.php';
return array_merge($defaultConfig, $userConfig);
}