This commit is contained in:
Namhyeon Go 2018-12-18 13:50:39 +09:00
parent 24bf827f01
commit 8f30b9dc83
2 changed files with 7 additions and 8 deletions

View File

@ -1,3 +1,5 @@
<?php
return <<<EOF
[sns]
sns_facebook_id=
sns_facebook_secret=
@ -7,3 +9,4 @@ sns_linkedin_id=
sns_linkedin_secret=
sns_google_id=
sns_google_secret=
EOF;

View File

@ -15,18 +15,14 @@ if(!function_exists("read_config")) {
$ini = array();
if(check_file_extension($file, "ini.php", array("multiple" => true))) {
$ini = parse_ini_string(include($file));
} elseif(check_file_extension($file, "config.php", array("multiple" => true))) {
$name = basename($file, ".config.php");
$ini[$name] = include($file);
$str = include($file);
$ini = parse_ini_string($str);
} elseif(check_file_extension($file, "ini")) {
$ini = parse_ini_file($file);
}
if(count($ini) > 0) {
foreach($ini as $k=>$v) {
$config[$k] = $v;
}
foreach($ini as $k=>$v) {
$config[$k] = $v;
}
}