<?php use Framework\Application; define('ROOT_PATH', realpath(dirname(__FILE__) . '/../')); define('SRC_PATH', ROOT_PATH . '/src'); define('FRAMEWORK_PATH', ROOT_PATH . '/framework'); require FRAMEWORK_PATH . '/Autoloader.php'; $autoloader = new Framework\Autoloader(); $autoloader->register(); $autoloader->addNamespace('Framework', FRAMEWORK_PATH); $autoloader->addNamespace('Students', SRC_PATH . '/students'); $autoloader->addNamespace('Src', SRC_PATH); $config = (require ROOT_PATH . '/app/config.php'); Application::run($config); function dd($v) { echo '<pre>'; print_r($v); echo '</pre>'; die; }
<?php require '../Framework/Autoloader.php'; Framework\Autoloader::register(); $config = (require '../App/config/config.php'); $app = new Framework\App($config); $app->run();