Простой загрузчик настроек
This commit is contained in:
parent
b6e91836dd
commit
486ba9f662
2 changed files with 9 additions and 2 deletions
9
core/config.php
Normal file
9
core/config.php
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
function loadConfig($filename) {
|
||||||
|
if (file_exists($filename)) {
|
||||||
|
include($filename);
|
||||||
|
return $settings;
|
||||||
|
}
|
||||||
|
throw new Exception("config $filename not found");
|
||||||
|
}
|
||||||
|
|
@ -14,5 +14,3 @@ class Database
|
||||||
return $database;
|
return $database;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue