This commit is contained in:
rsgrinko committed 2022-04-18 13:59:35 +03:00
1 parent ed22916fa7
commit c1d9c174ba
7 files changed
+727 -7

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
<?php
require_once __DIR__ . '/config.php';
/**
* Реализация механизма автозагрузки классов
*/
spl_autoload_register(function ($class) {
if (strpos($class, 'Core') === 0) {
$class = str_replace('\\', '/', $class);
$classPath = __DIR__ . '/lib/' . $class . '.class.php';
echo $classPath;
if (file_exists($classPath)) {
require_once $classPath;
}
}
});