Update config.php
This commit is contained in:
parent
777fb92a46
commit
bac0c413b9
|
@ -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")) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user