Example #1
0
<?php

chdir('..');
define('APPLICATION_PATH', getcwd());
require 'autoload.php';
$config = Utils\Model\Config::getConfig();
// echo "<pre>";
// print_r($config);
// echo "</pre>";
// die;
// $config
$route = Utils\Model\Router::Route($_SERVER['REQUEST_URI'], $config);
$dispatch = Utils\Model\Dispatch::run($route, $config);
// echo "<pre>";
header("Content-type: application/json");
print_r($dispatch['content']);
// echo "</pre>";
// echo Utils\Model\View::RenderLayout($route, $dispatch);
Example #2
0
<?php

chdir('..');
define('APPLICATION_PATH', getcwd());
require 'autoload.php';
$configarray = (require '/config/config.php');
$config = Utils\Model\Config::getInstance();
$config->Rewrite($configarray);
$router = Utils\Model\Router::route($_SERVER['REQUEST_URI'], $config);
Utils\Model\Dispatch::run($router);