<?php define("BASE_DIR", __DIR__); define("CONFIG_DIR", __DIR__ . "/config"); define("ENGINE_DIR", __DIR__ . "/engine"); define("TEMPLATES_DIR", __DIR__ . "/templates"); require_once __DIR__ . "/engine/autoloader.php"; Application\Application::run(); Application\Application::run(); $a; $d; $ff;
<?php require 'Engine/AutoLoad.php'; AutoLoad::Start(); //Engine\Generic\Server::ShowServerVars(); $app = new Application\Application(); $app->UseSession = false; $app->SessionTimeOut = 3; $app->Start(); //$app->Session->SetLogin(TRUE); //(new Engine\App\Config())->PrintProperties(); //(new Engine\App\Session())->PrintProperties();
*/ define('local', (bool) strstr($_SERVER['SERVER_NAME'], '.local'), true); /** * HTTP/HTTPS constants. * @const string */ define('http', 'http://' . $_SERVER['SERVER_NAME'], true); define('https', 'https://' . $_SERVER['SERVER_NAME'], true); /** * Error settings. */ if (local) { ini_set('display_errors', 1); ini_set('error_reporting', E_ALL); } /** * Load global base files. */ require root . '/sys/global/def.php'; require root . '/sys/global/cfg.php'; require root . '/sys/global/fun.php'; /** * Register autoload. */ $autoload = (require root . '/sys/library/class/Autoload.php'); $autoload->register(); /** * Init application with default configs (comes from cfg.php). */ return Application\Application::init($cfg);
<?php error_reporting(E_ALL); ini_set('html_errors', 'on'); class_exists('ManaPHP\\Loader') || (require dirname(__DIR__) . '/ManaPHP/Loader.php'); //require dirname(__DIR__) . '/ManaPHP/base.php'; $loader = new \ManaPHP\Loader(dirname(__DIR__) . '/ManaPHP'); //new \ManaPHP\Mvc\Router\RewriteChecker(); require dirname(__DIR__) . '/Application/Application.php'; $application = new \Application\Application($loader); $application->main(); //$application->getDependencyInjector()->filesystem->filePut('@manaphp/base.php',(new \ManaPHP\Loader\ClassMerger())->merge());
<?php error_reporting(-1); session_start(); spl_autoload_register(function ($name) { $namespaceToPath = str_replace('\\', DIRECTORY_SEPARATOR, $name); $filePath = __DIR__ . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . $namespaceToPath . '.php'; if (is_file($filePath)) { require $filePath; return true; } return false; }); $app = new \Application\Application(); $app->run();
<?php /* -- Global Parameters */ define('APP_ROOT', __DIR__ . '/'); define('APP_SRC', APP_ROOT . 'src/'); define('APP_SETTINGS', APP_ROOT . 'settings/'); define('APP_BUNDLE', APP_SRC . 'Application/'); define('APP_TEMPLATE', APP_ROOT . '/template/'); define('APP_VENDOR', APP_ROOT . '/vendor/'); define('APP_ENVIRONMENT', 'dev'); /* -- Composer */ require APP_VENDOR . 'autoload.php'; /* -- Application Instance */ $app = new Application\Application(); $app['environment'] = APP_ENVIRONMENT; /* -- Bundle Loader */ foreach (include APP_SETTINGS . 'bundles.php' as $mountPoint => $bundleName) { $bundleName .= '\\' . $bundleName . 'Bundle'; $app->register($bundle = new $bundleName()); $app->mount($mountPoint, $bundle); } return $app;