Update config.php

This commit is contained in:
Namhyeon Go 2018-05-26 01:28:17 +09:00 committed by GitHub
parent 777fb92a46
commit bac0c413b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,23 +7,21 @@
*/
if(!function_exists("read_config")) {
function read_config() {
$config = array();
function read_config() {
$config = array();
if($handle = opendir('./config')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && @end(explode('.', $file)) == 'ini') {
$ini = parse_ini_file('./config/' . $file);
foreach($ini as $k=>$v) {
$config[$k] = $v;
}
$files = get_storage_files("config");
foreach($files as $file) {
if(check_file_extension($file, "ini")) {
$ini = parse_ini_file($file);
foreach($ini as $k=>$v) {
$config[$k] = $v;
}
}
}
}
closedir($handle);
}
return $config;
}
return $config;
}
}
if(!function_exists("get_config")) {