1
0
mirror of https://github.com/glmdev/eecs448-lab10 synced 2026-03-02 03:39:24 +00:00

Initial commit

This commit is contained in:
2020-12-06 13:58:02 -06:00
commit 5a54fe251d
24 changed files with 911 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
<?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;
}