You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
368 B
19 lines
368 B
<?php
|
|
|
|
function config($path, $default_value = null) {
|
|
$parts = explode('.', $path);
|
|
|
|
if ( !$parts[0] ) {
|
|
return $default_value;
|
|
}
|
|
|
|
$config = require_system('config/' . $parts[0] . '.php');
|
|
foreach ( $parts as $i => $part ) {
|
|
if ( $i !== 0 && $config ) {
|
|
$config = $config[$part];
|
|
}
|
|
}
|
|
|
|
return $config;
|
|
}
|