Ejemplo n.º 1
0
<?php

session_start();
set_include_path('scripts' . PATH_SEPARATOR . get_include_path());
require_once 'config.php';
include 'autoloader.php';
require_once 'config-router.php';
$router = new \Router\Router('http://' . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]);
$router->run();
$file = $router->getFile();
$classController = $router->getClass();
$method = $router->getMethod();
require_once $file;
$obj = new $classController();
$obj->{$method}();