reasonableframework/system/config.php

22 lines
604 B
PHP
Raw Normal View History

2017-12-17 20:40:04 +00:00
<?php
2018-02-12 05:43:11 +00:00
if(!function_exists("get_config")) {
function get_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;
}
}
}
closedir($handle);
2017-12-17 20:40:04 +00:00
}
2018-02-12 05:43:11 +00:00
return $config;
2017-12-17 20:40:04 +00:00
}
}
2018-02-12 05:43:11 +00:00
$config = get_config();