Данные через loadConfig, а не как глобальные переменные
This commit is contained in:
parent
486ba9f662
commit
c13777d7e3
8 changed files with 21 additions and 26 deletions
|
|
@ -1,8 +1,7 @@
|
|||
<?php
|
||||
|
||||
function loadConfig($filename) {
|
||||
if (file_exists($filename)) {
|
||||
include($filename);
|
||||
if (@include($filename)) {
|
||||
return $settings;
|
||||
}
|
||||
throw new Exception("config $filename not found");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue