Update config.php
This commit is contained in:
parent
6c03b1e444
commit
7617c6de66
|
@ -8,8 +8,6 @@
|
||||||
|
|
||||||
if(!function_exists("set_config")) {
|
if(!function_exists("set_config")) {
|
||||||
function set_config() {
|
function set_config() {
|
||||||
global $config;
|
|
||||||
|
|
||||||
if($handle = opendir('./config')) {
|
if($handle = opendir('./config')) {
|
||||||
while (false !== ($file = readdir($handle))) {
|
while (false !== ($file = readdir($handle))) {
|
||||||
if ($file != "." && $file != ".." && @end(explode('.', $file)) == 'ini') {
|
if ($file != "." && $file != ".." && @end(explode('.', $file)) == 'ini') {
|
||||||
|
@ -27,8 +25,8 @@ if(!function_exists("set_config")) {
|
||||||
function get_config() {
|
function get_config() {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
$config = is_array($config) ? $config : array();
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
$config = array();
|
$config = set_config();
|
||||||
set_config();
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user