Update config.php
This commit is contained in:
parent
88fe3a3c7b
commit
c48bdcbf46
|
@ -26,10 +26,25 @@ if(!function_exists("read_config")) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_config() {
|
if(!function_exists("get_config")) {
|
||||||
global $config;
|
function get_config() {
|
||||||
$config = is_array($config) ? $config : read_config();
|
global $config;
|
||||||
return $config;
|
$config = is_array($config) ? $config : read_config();
|
||||||
|
return $config;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!function_exists("get_config_value")) {
|
||||||
|
function get_config_value($key) {
|
||||||
|
$config = get_config();
|
||||||
|
|
||||||
|
$config_value = '';
|
||||||
|
if(!array_key_empty($key, $config)) {
|
||||||
|
$config_value = $config[$key];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $config_value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$config = read_config();
|
$config = read_config();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user