<?php // The bootstrap file is a basic DispatchPHP starter file. // Define some global constants to make including easier define('ROOT', dirname(__FILE__) . '/'); define('APPLICATION_PATH', ROOT . 'application/'); define('CONFIG_PATH', ROOT . 'config/'); define('SYSTEM_PATH', ROOT . 'system/'); define('CSS_BASE_PATH', realpath(ROOT . '/../')); // Start sessions session_start(); // Define the autoloader strategy require SYSTEM_PATH . 'autoloader.php'; spl_autoload_register('Autoloader::load'); // Add the lib directory Autoloader::$paths[] = APPLICATION_PATH . '/lib'; // Include the modules Autoloader::module('advanced-views'); Autoloader::module('asset-helpers'); Autoloader::module('database'); // Dispatch the request for the give URL Dispatcher::dispatch();
<?php // Define some global constants to make including easier define('ROOT', realpath(dirname(__FILE__)) . '/'); define('APPLICATION_PATH', ROOT . 'application/'); define('CONFIG_PATH', ROOT . 'config/'); define('SYSTEM_PATH', ROOT . 'system/'); // Define the autoloader strategy require SYSTEM_PATH . 'autoloader.php'; spl_autoload_register('Autoloader::load'); // Include the modules Autoloader::module('model'); // Include the database configuration require CONFIG_PATH . 'database.php'; // Include the routes require CONFIG_PATH . '/routes.php'; // Include the site-wide helpers require APPLICATION_PATH . '/helpers/global.php'; // Dispatch the request for the give URL Dispatcher::dispatch();