2020-03-08 04:37:19 +01:00
|
|
|
<?php
|
|
|
|
require_once('config.php');
|
|
|
|
|
|
|
|
// Incluir clases
|
|
|
|
spl_autoload_register(function ($className) {
|
|
|
|
$fp = str_replace('\\','/',$className);
|
|
|
|
$name = basename($fp);
|
|
|
|
$dir = dirname($fp);
|
2024-05-10 00:36:48 +02:00
|
|
|
$file = ROOT_CORE.'/'.$dir.'/'.$name.'.php';
|
2024-10-30 00:10:47 +01:00
|
|
|
if (file_exists($file))
|
2021-10-22 05:34:49 +02:00
|
|
|
require_once $file;
|
2020-03-08 04:37:19 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
// Incluir routers
|
2024-05-10 00:36:48 +02:00
|
|
|
$routers = glob(ROOT_CORE.'/Routers/*.php');
|
2020-03-08 04:37:19 +01:00
|
|
|
|
|
|
|
foreach($routers as $file){
|
2021-10-22 05:34:49 +02:00
|
|
|
require_once($file);
|
2020-03-08 04:37:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
\Libs\Router::apply();
|
|
|
|
?>
|