<?php $rootDirectoryPath = realpath(dirname(__FILE__)); define ('__ROOT_DIR', $rootDirectoryPath ); require_once(__ROOT_DIR . "/config/config.php"); require_once(__ROOT_DIR . '/classes/AutoLoader.class.php'); $request = Request::getCurrentRequest(); Response::interceptEchos(); try { $controller = Dispatcher::dispatch($request); $response = $controller->execute(); } catch (Exception $e) { $log = Response::getEchos(); $log .= " " . $e->getMessage(); $response = Response::errorResponse($log); } $response->send(); ?>