<?php require_once __DIR__ . '/../vendor/autoload.php'; Symfony\Component\Debug\Debug::enable(); $app = new App\Application('dev'); $app->run();
<?php require __DIR__ . '/../app/_bootstrap.php'; require __DIR__ . '/../app/Application.php'; $app = new \App\Application('devel', true); $app->run(new \Micro\Web\Request())->send(); $app->terminate();
<?php require __DIR__ . '/../app/_bootstrap.php'; require __DIR__ . '/../app/Application.php'; $app = new \App\Application('devel', true); if (array_key_exists('r', $_GET) && 0 !== strpos($_GET['r'], '/rest') && false === strpos($_GET['r'], '/admin')) { $_GET['r'] = '/'; } $response = $app->run(new \Micro\Web\Request()); $response->send(); $app->terminate();
<?php require_once dirname(__DIR__) . '/vendor/autoload.php'; $parser = new Symfony\Component\Yaml\Yaml(); $global = $parser->parse(dirname(__DIR__) . '/config/global.yml'); $config = $parser->parse(sprintf(dirname(__DIR__) . '/config/%s.yml', $global['environment'])); $security = $parser->parse(dirname(__DIR__) . '/config/security.yml'); $routes = $parser->parse(dirname(__DIR__) . '/config/routes.yml'); $app = new App\Application(array_merge($global, $config, $security, $routes)); /** Doctrine cli-config also uses this bootstrap for db etc, so don't run HTTP stuff if cli is being used **/ isset($cli) ?: $app->run();
<?php //变换路径的测试 //--------------------------------------------------- include "../../Sham/Helper.php"; include "../../vendor/autoload.php"; //--------------------------------------------------- define('APPROOT', '../../App/'); App\Application::run(); //发现某些基于路径的错误