Данные через loadConfig, а не как глобальные переменные

This commit is contained in:
Фёдор Подлеснов 2016-07-18 16:23:55 +03:00
parent 486ba9f662
commit c13777d7e3
8 changed files with 21 additions and 26 deletions

View file

@ -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");