<?php /** * Created by PhpStorm. * User: hehanlin * Date: 2015/8/1 * Time: 10:41 */ define('BASEDIR', __DIR__); require_once BASEDIR . '/System/Loader.php'; spl_autoload_register('\\System\\Loader::autoload'); System\Application::getInstance(BASEDIR)->dispatch();
<?php $app = new System\Application(); // if the framework files and folders are within a folder in your local server, in my case, mvc. // you have to set the base path. $app->getInstance('router')->setBasePath('mvc/public/'); require_once BASE_PATH . 'app/routes.php'; $app->run();