/www/wwwroot/bd/vendor/topthink/framework/src/think/Route.php
* @throws RouteNotFoundException
*/
public function check()
{
// 自动检测域名路由
$url = str_replace($this->config['pathinfo_depr'], '|', $this->path());
$completeMatch = $this->config['route_complete_match'];
$result = $this->checkDomain()->check($this->request, $url, $completeMatch);
if (false === $result && !empty($this->cross)) {
// 检测跨域路由
$result = $this->cross->check($this->request, $url, $completeMatch);
}
if (false !== $result) {
return $result;
} elseif ($this->config['url_route_must']) {
throw new RouteNotFoundException();
}
return $this->url($url);
}
/**
* 获取当前请求URL的pathinfo信息(不含URL后缀)
* @access protected
* @return string
*/
protected function path(): string
{
$suffix = $this->config['url_html_suffix'];
$pathinfo = $this->request->pathinfo();
if (false === $suffix) {
// 禁止伪静态访问
$path = $pathinfo;
} elseif ($suffix) {
// 去除正常的URL后缀
Arguments
/www/wwwroot/bd/vendor/topthink/framework/src/think/Route.php
return $this->group->miss($route, $method);
}
/**
* 路由调度
* @param Request $request
* @param Closure|bool $withRoute
* @return Response
*/
public function dispatch(Request $request, $withRoute = true)
{
$this->request = $request;
$this->host = $this->request->host(true);
if ($withRoute) {
//加载路由
if ($withRoute instanceof Closure) {
$withRoute();
}
$dispatch = $this->check();
} else {
$dispatch = $this->url($this->path());
}
$dispatch->init($this->app);
return $this->app->middleware->pipeline('route')
->send($request)
->then(function () use ($dispatch) {
return $dispatch->run();
});
}
/**
* 检测URL路由
* @access public
* @return Dispatch|false
* @throws RouteNotFoundException
*/
public function check()
/www/wwwroot/bd/vendor/topthink/framework/src/think/Http.php
// 加载全局中间件
$this->loadMiddleware();
// 监听HttpRun
$this->app->event->trigger(HttpRun::class);
return $this->app->middleware->pipeline()
->send($request)
->then(function ($request) {
return $this->dispatchToRoute($request);
});
}
protected function dispatchToRoute($request)
{
$withRoute = $this->app->config->get('app.with_route', true) ? function () {
$this->loadRoutes();
} : null;
return $this->app->route->dispatch($request, $withRoute);
}
/**
* 加载全局中间件
*/
protected function loadMiddleware(): void
{
if (is_file($this->app->getBasePath() . 'middleware.php')) {
$this->app->middleware->import(include $this->app->getBasePath() . 'middleware.php');
}
}
/**
* 加载路由
* @access protected
* @return void
*/
protected function loadRoutes(): void
{
// 加载路由定义
Arguments
app\Request {#48}
Closure() {#64 …4}
/www/wwwroot/bd/vendor/topthink/framework/src/think/Http.php
}
}
/**
* 执行应用程序
* @param Request $request
* @return mixed
*/
protected function runWithRequest(Request $request)
{
// 加载全局中间件
$this->loadMiddleware();
// 监听HttpRun
$this->app->event->trigger(HttpRun::class);
return $this->app->middleware->pipeline()
->send($request)
->then(function ($request) {
return $this->dispatchToRoute($request);
});
}
protected function dispatchToRoute($request)
{
$withRoute = $this->app->config->get('app.with_route', true) ? function () {
$this->loadRoutes();
} : null;
return $this->app->route->dispatch($request, $withRoute);
}
/**
* 加载全局中间件
*/
protected function loadMiddleware(): void
{
if (is_file($this->app->getBasePath() . 'middleware.php')) {
$this->app->middleware->import(include $this->app->getBasePath() . 'middleware.php');
}
Arguments
/www/wwwroot/bd/vendor/topthink/framework/src/think/Pipeline.php
*/
public function through($pipes)
{
$this->pipes = is_array($pipes) ? $pipes : func_get_args();
return $this;
}
/**
* 执行
* @param Closure $destination
* @return mixed
*/
public function then(Closure $destination)
{
$pipeline = array_reduce(
array_reverse($this->pipes),
$this->carry(),
function ($passable) use ($destination) {
try {
return $destination($passable);
} catch (Throwable | Exception $e) {
return $this->handleException($passable, $e);
}
}
);
return $pipeline($this->passable);
}
/**
* 设置异常处理器
* @param callable $handler
* @return $this
*/
public function whenException($handler)
{
$this->exceptionHandler = $handler;
return $this;
}
Arguments
/www/wwwroot/bd/vendor/topthink/think-multi-app/src/MultiApp.php
$this->app = $app;
}
/**
* 多应用解析
* @access public
* @param Request $request
* @param Closure $next
* @return Response
*/
public function handle($request, Closure $next)
{
if (!$this->parseMultiApp()) {
return $next($request);
}
return $this->app->middleware->pipeline('app')
->send($request)
->then(function ($request) use ($next) {
return $next($request);
});
}
/**
* 获取路由目录
* @access protected
* @return string
*/
protected function getRoutePath(): string
{
return $this->app->getAppPath() . 'route' . DIRECTORY_SEPARATOR;
}
/**
* 解析多应用
* @return bool
*/
protected function parseMultiApp(): bool
{
$scriptName = $this->getScriptName();
Arguments
/www/wwwroot/bd/vendor/topthink/framework/src/think/Pipeline.php
*/
public function through($pipes)
{
$this->pipes = is_array($pipes) ? $pipes : func_get_args();
return $this;
}
/**
* 执行
* @param Closure $destination
* @return mixed
*/
public function then(Closure $destination)
{
$pipeline = array_reduce(
array_reverse($this->pipes),
$this->carry(),
function ($passable) use ($destination) {
try {
return $destination($passable);
} catch (Throwable | Exception $e) {
return $this->handleException($passable, $e);
}
}
);
return $pipeline($this->passable);
}
/**
* 设置异常处理器
* @param callable $handler
* @return $this
*/
public function whenException($handler)
{
$this->exceptionHandler = $handler;
return $this;
}
Arguments
/www/wwwroot/bd/vendor/topthink/framework/src/think/middleware/SessionInit.php
// Session初始化
$varSessionId = $this->app->config->get('session.var_session_id');
$cookieName = $this->session->getName();
if ($varSessionId && $request->request($varSessionId)) {
$sessionId = $request->request($varSessionId);
} else {
$sessionId = $request->cookie($cookieName);
}
if ($sessionId) {
$this->session->setId($sessionId);
}
$this->session->init();
$request->withSession($this->session);
/** @var Response $response */
$response = $next($request);
$response->setSession($this->session);
$this->app->cookie->set($cookieName, $this->session->getId(), $this->session->getConfig('expire'));
return $response;
}
public function end(Response $response)
{
$this->session->save();
}
}
Arguments
/www/wwwroot/bd/vendor/topthink/framework/src/think/Middleware.php
{
return $this->queue[$type] ?? [];
}
/**
* 调度管道
* @access public
* @param string $type 中间件类型
* @return Pipeline
*/
public function pipeline(string $type = 'global')
{
return (new Pipeline())
->through(array_map(function ($middleware) {
return function ($request, $next) use ($middleware) {
[$call, $params] = $middleware;
if (is_array($call) && is_string($call[0])) {
$call = [$this->app->make($call[0]), $call[1]];
}
$response = call_user_func($call, $request, $next, ...$params);
if (!$response instanceof Response) {
throw new LogicException('The middleware must return Response instance');
}
return $response;
};
}, $this->sortMiddleware($this->queue[$type] ?? [])))
->whenException([$this, 'handleException']);
}
/**
* 结束调度
* @param Response $response
*/
public function end(Response $response)
{
foreach ($this->queue as $queue) {
foreach ($queue as $middleware) {
[$call] = $middleware;
if (is_array($call) && is_string($call[0])) {
Arguments
app\Request {#48}
Closure($passable) {#66 …4}
/www/wwwroot/bd/vendor/topthink/framework/src/think/Middleware.php
{
return $this->queue[$type] ?? [];
}
/**
* 调度管道
* @access public
* @param string $type 中间件类型
* @return Pipeline
*/
public function pipeline(string $type = 'global')
{
return (new Pipeline())
->through(array_map(function ($middleware) {
return function ($request, $next) use ($middleware) {
[$call, $params] = $middleware;
if (is_array($call) && is_string($call[0])) {
$call = [$this->app->make($call[0]), $call[1]];
}
$response = call_user_func($call, $request, $next, ...$params);
if (!$response instanceof Response) {
throw new LogicException('The middleware must return Response instance');
}
return $response;
};
}, $this->sortMiddleware($this->queue[$type] ?? [])))
->whenException([$this, 'handleException']);
}
/**
* 结束调度
* @param Response $response
*/
public function end(Response $response)
{
foreach ($this->queue as $queue) {
foreach ($queue as $middleware) {
[$call] = $middleware;
if (is_array($call) && is_string($call[0])) {
Arguments
array:2 [
0 => think\middleware\SessionInit {#62}
1 => "handle"
]
app\Request {#48}
Closure($passable) {#66 …4}
/www/wwwroot/bd/vendor/topthink/framework/src/think/Pipeline.php
return $pipeline($this->passable);
}
/**
* 设置异常处理器
* @param callable $handler
* @return $this
*/
public function whenException($handler)
{
$this->exceptionHandler = $handler;
return $this;
}
protected function carry()
{
return function ($stack, $pipe) {
return function ($passable) use ($stack, $pipe) {
try {
return $pipe($passable, $stack);
} catch (Throwable | Exception $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
* 异常处理
* @param $passable
* @param $e
* @return mixed
*/
protected function handleException($passable, Throwable $e)
{
if ($this->exceptionHandler) {
return call_user_func($this->exceptionHandler, $passable, $e);
}
throw $e;
}
Arguments
app\Request {#48}
Closure($passable) {#66 …4}
/www/wwwroot/bd/vendor/topthink/framework/src/think/Pipeline.php
/**
* 执行
* @param Closure $destination
* @return mixed
*/
public function then(Closure $destination)
{
$pipeline = array_reduce(
array_reverse($this->pipes),
$this->carry(),
function ($passable) use ($destination) {
try {
return $destination($passable);
} catch (Throwable | Exception $e) {
return $this->handleException($passable, $e);
}
}
);
return $pipeline($this->passable);
}
/**
* 设置异常处理器
* @param callable $handler
* @return $this
*/
public function whenException($handler)
{
$this->exceptionHandler = $handler;
return $this;
}
protected function carry()
{
return function ($stack, $pipe) {
return function ($passable) use ($stack, $pipe) {
try {
return $pipe($passable, $stack);
} catch (Throwable | Exception $e) {
Arguments
/www/wwwroot/bd/vendor/topthink/think-multi-app/src/MultiApp.php
}
/**
* 多应用解析
* @access public
* @param Request $request
* @param Closure $next
* @return Response
*/
public function handle($request, Closure $next)
{
if (!$this->parseMultiApp()) {
return $next($request);
}
return $this->app->middleware->pipeline('app')
->send($request)
->then(function ($request) use ($next) {
return $next($request);
});
}
/**
* 获取路由目录
* @access protected
* @return string
*/
protected function getRoutePath(): string
{
return $this->app->getAppPath() . 'route' . DIRECTORY_SEPARATOR;
}
/**
* 解析多应用
* @return bool
*/
protected function parseMultiApp(): bool
{
$scriptName = $this->getScriptName();
$defaultApp = $this->app->config->get('app.default_app') ?: 'index';
Arguments
Closure($request) {#58 …4}
/www/wwwroot/bd/vendor/topthink/framework/src/think/Middleware.php
{
return $this->queue[$type] ?? [];
}
/**
* 调度管道
* @access public
* @param string $type 中间件类型
* @return Pipeline
*/
public function pipeline(string $type = 'global')
{
return (new Pipeline())
->through(array_map(function ($middleware) {
return function ($request, $next) use ($middleware) {
[$call, $params] = $middleware;
if (is_array($call) && is_string($call[0])) {
$call = [$this->app->make($call[0]), $call[1]];
}
$response = call_user_func($call, $request, $next, ...$params);
if (!$response instanceof Response) {
throw new LogicException('The middleware must return Response instance');
}
return $response;
};
}, $this->sortMiddleware($this->queue[$type] ?? [])))
->whenException([$this, 'handleException']);
}
/**
* 结束调度
* @param Response $response
*/
public function end(Response $response)
{
foreach ($this->queue as $queue) {
foreach ($queue as $middleware) {
[$call] = $middleware;
if (is_array($call) && is_string($call[0])) {
Arguments
app\Request {#48}
Closure($passable) {#52 …4}
/www/wwwroot/bd/vendor/topthink/framework/src/think/Middleware.php
{
return $this->queue[$type] ?? [];
}
/**
* 调度管道
* @access public
* @param string $type 中间件类型
* @return Pipeline
*/
public function pipeline(string $type = 'global')
{
return (new Pipeline())
->through(array_map(function ($middleware) {
return function ($request, $next) use ($middleware) {
[$call, $params] = $middleware;
if (is_array($call) && is_string($call[0])) {
$call = [$this->app->make($call[0]), $call[1]];
}
$response = call_user_func($call, $request, $next, ...$params);
if (!$response instanceof Response) {
throw new LogicException('The middleware must return Response instance');
}
return $response;
};
}, $this->sortMiddleware($this->queue[$type] ?? [])))
->whenException([$this, 'handleException']);
}
/**
* 结束调度
* @param Response $response
*/
public function end(Response $response)
{
foreach ($this->queue as $queue) {
foreach ($queue as $middleware) {
[$call] = $middleware;
if (is_array($call) && is_string($call[0])) {
Arguments
array:2 [
0 => think\app\MultiApp {#63}
1 => "handle"
]
app\Request {#48}
Closure($passable) {#52 …4}
/www/wwwroot/bd/vendor/topthink/framework/src/think/Pipeline.php
return $pipeline($this->passable);
}
/**
* 设置异常处理器
* @param callable $handler
* @return $this
*/
public function whenException($handler)
{
$this->exceptionHandler = $handler;
return $this;
}
protected function carry()
{
return function ($stack, $pipe) {
return function ($passable) use ($stack, $pipe) {
try {
return $pipe($passable, $stack);
} catch (Throwable | Exception $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
* 异常处理
* @param $passable
* @param $e
* @return mixed
*/
protected function handleException($passable, Throwable $e)
{
if ($this->exceptionHandler) {
return call_user_func($this->exceptionHandler, $passable, $e);
}
throw $e;
}
Arguments
app\Request {#48}
Closure($passable) {#52 …4}
/www/wwwroot/bd/vendor/topthink/framework/src/think/middleware/SessionInit.php
// Session初始化
$varSessionId = $this->app->config->get('session.var_session_id');
$cookieName = $this->session->getName();
if ($varSessionId && $request->request($varSessionId)) {
$sessionId = $request->request($varSessionId);
} else {
$sessionId = $request->cookie($cookieName);
}
if ($sessionId) {
$this->session->setId($sessionId);
}
$this->session->init();
$request->withSession($this->session);
/** @var Response $response */
$response = $next($request);
$response->setSession($this->session);
$this->app->cookie->set($cookieName, $this->session->getId(), $this->session->getConfig('expire'));
return $response;
}
public function end(Response $response)
{
$this->session->save();
}
}
Arguments
/www/wwwroot/bd/vendor/topthink/framework/src/think/Middleware.php
{
return $this->queue[$type] ?? [];
}
/**
* 调度管道
* @access public
* @param string $type 中间件类型
* @return Pipeline
*/
public function pipeline(string $type = 'global')
{
return (new Pipeline())
->through(array_map(function ($middleware) {
return function ($request, $next) use ($middleware) {
[$call, $params] = $middleware;
if (is_array($call) && is_string($call[0])) {
$call = [$this->app->make($call[0]), $call[1]];
}
$response = call_user_func($call, $request, $next, ...$params);
if (!$response instanceof Response) {
throw new LogicException('The middleware must return Response instance');
}
return $response;
};
}, $this->sortMiddleware($this->queue[$type] ?? [])))
->whenException([$this, 'handleException']);
}
/**
* 结束调度
* @param Response $response
*/
public function end(Response $response)
{
foreach ($this->queue as $queue) {
foreach ($queue as $middleware) {
[$call] = $middleware;
if (is_array($call) && is_string($call[0])) {
Arguments
app\Request {#48}
Closure($passable) {#53 …4}
/www/wwwroot/bd/vendor/topthink/framework/src/think/Middleware.php
{
return $this->queue[$type] ?? [];
}
/**
* 调度管道
* @access public
* @param string $type 中间件类型
* @return Pipeline
*/
public function pipeline(string $type = 'global')
{
return (new Pipeline())
->through(array_map(function ($middleware) {
return function ($request, $next) use ($middleware) {
[$call, $params] = $middleware;
if (is_array($call) && is_string($call[0])) {
$call = [$this->app->make($call[0]), $call[1]];
}
$response = call_user_func($call, $request, $next, ...$params);
if (!$response instanceof Response) {
throw new LogicException('The middleware must return Response instance');
}
return $response;
};
}, $this->sortMiddleware($this->queue[$type] ?? [])))
->whenException([$this, 'handleException']);
}
/**
* 结束调度
* @param Response $response
*/
public function end(Response $response)
{
foreach ($this->queue as $queue) {
foreach ($queue as $middleware) {
[$call] = $middleware;
if (is_array($call) && is_string($call[0])) {
Arguments
array:2 [
0 => think\middleware\SessionInit {#62}
1 => "handle"
]
app\Request {#48}
Closure($passable) {#53 …4}
/www/wwwroot/bd/vendor/topthink/framework/src/think/Pipeline.php
return $pipeline($this->passable);
}
/**
* 设置异常处理器
* @param callable $handler
* @return $this
*/
public function whenException($handler)
{
$this->exceptionHandler = $handler;
return $this;
}
protected function carry()
{
return function ($stack, $pipe) {
return function ($passable) use ($stack, $pipe) {
try {
return $pipe($passable, $stack);
} catch (Throwable | Exception $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
* 异常处理
* @param $passable
* @param $e
* @return mixed
*/
protected function handleException($passable, Throwable $e)
{
if ($this->exceptionHandler) {
return call_user_func($this->exceptionHandler, $passable, $e);
}
throw $e;
}
Arguments
app\Request {#48}
Closure($passable) {#53 …4}
/www/wwwroot/bd/vendor/topthink/think-trace/src/TraceDebug.php
* @access public
* @param Request $request
* @param Closure $next
* @return void
*/
public function handle($request, Closure $next)
{
$debug = $this->app->isDebug();
// 注册日志监听
if ($debug) {
$this->log = [];
$this->app->event->listen(LogWrite::class, function ($event) {
if (empty($this->config['channel']) || $this->config['channel'] == $event->channel) {
$this->log = array_merge_recursive($this->log, $event->log);
}
});
}
$response = $next($request);
// Trace调试注入
if ($debug) {
$data = $response->getContent();
$this->traceDebug($response, $data);
$response->content($data);
}
return $response;
}
public function traceDebug(Response $response, &$content)
{
$config = $this->config;
$type = $config['type'] ?? 'Html';
unset($config['type']);
$trace = App::factory($type, '\\think\\trace\\', $config);
Arguments
/www/wwwroot/bd/vendor/topthink/framework/src/think/Middleware.php
{
return $this->queue[$type] ?? [];
}
/**
* 调度管道
* @access public
* @param string $type 中间件类型
* @return Pipeline
*/
public function pipeline(string $type = 'global')
{
return (new Pipeline())
->through(array_map(function ($middleware) {
return function ($request, $next) use ($middleware) {
[$call, $params] = $middleware;
if (is_array($call) && is_string($call[0])) {
$call = [$this->app->make($call[0]), $call[1]];
}
$response = call_user_func($call, $request, $next, ...$params);
if (!$response instanceof Response) {
throw new LogicException('The middleware must return Response instance');
}
return $response;
};
}, $this->sortMiddleware($this->queue[$type] ?? [])))
->whenException([$this, 'handleException']);
}
/**
* 结束调度
* @param Response $response
*/
public function end(Response $response)
{
foreach ($this->queue as $queue) {
foreach ($queue as $middleware) {
[$call] = $middleware;
if (is_array($call) && is_string($call[0])) {
Arguments
app\Request {#48}
Closure($passable) {#54 …4}
/www/wwwroot/bd/vendor/topthink/framework/src/think/Middleware.php
{
return $this->queue[$type] ?? [];
}
/**
* 调度管道
* @access public
* @param string $type 中间件类型
* @return Pipeline
*/
public function pipeline(string $type = 'global')
{
return (new Pipeline())
->through(array_map(function ($middleware) {
return function ($request, $next) use ($middleware) {
[$call, $params] = $middleware;
if (is_array($call) && is_string($call[0])) {
$call = [$this->app->make($call[0]), $call[1]];
}
$response = call_user_func($call, $request, $next, ...$params);
if (!$response instanceof Response) {
throw new LogicException('The middleware must return Response instance');
}
return $response;
};
}, $this->sortMiddleware($this->queue[$type] ?? [])))
->whenException([$this, 'handleException']);
}
/**
* 结束调度
* @param Response $response
*/
public function end(Response $response)
{
foreach ($this->queue as $queue) {
foreach ($queue as $middleware) {
[$call] = $middleware;
if (is_array($call) && is_string($call[0])) {
Arguments
array:2 [
0 => think\trace\TraceDebug {#60}
1 => "handle"
]
app\Request {#48}
Closure($passable) {#54 …4}
/www/wwwroot/bd/vendor/topthink/framework/src/think/Pipeline.php
return $pipeline($this->passable);
}
/**
* 设置异常处理器
* @param callable $handler
* @return $this
*/
public function whenException($handler)
{
$this->exceptionHandler = $handler;
return $this;
}
protected function carry()
{
return function ($stack, $pipe) {
return function ($passable) use ($stack, $pipe) {
try {
return $pipe($passable, $stack);
} catch (Throwable | Exception $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
* 异常处理
* @param $passable
* @param $e
* @return mixed
*/
protected function handleException($passable, Throwable $e)
{
if ($this->exceptionHandler) {
return call_user_func($this->exceptionHandler, $passable, $e);
}
throw $e;
}
Arguments
app\Request {#48}
Closure($passable) {#54 …4}
/www/wwwroot/bd/vendor/topthink/framework/src/think/Pipeline.php
/**
* 执行
* @param Closure $destination
* @return mixed
*/
public function then(Closure $destination)
{
$pipeline = array_reduce(
array_reverse($this->pipes),
$this->carry(),
function ($passable) use ($destination) {
try {
return $destination($passable);
} catch (Throwable | Exception $e) {
return $this->handleException($passable, $e);
}
}
);
return $pipeline($this->passable);
}
/**
* 设置异常处理器
* @param callable $handler
* @return $this
*/
public function whenException($handler)
{
$this->exceptionHandler = $handler;
return $this;
}
protected function carry()
{
return function ($stack, $pipe) {
return function ($passable) use ($stack, $pipe) {
try {
return $pipe($passable, $stack);
} catch (Throwable | Exception $e) {
Arguments
/www/wwwroot/bd/vendor/topthink/framework/src/think/Http.php
}
/**
* 执行应用程序
* @param Request $request
* @return mixed
*/
protected function runWithRequest(Request $request)
{
// 加载全局中间件
$this->loadMiddleware();
// 监听HttpRun
$this->app->event->trigger(HttpRun::class);
return $this->app->middleware->pipeline()
->send($request)
->then(function ($request) {
return $this->dispatchToRoute($request);
});
}
protected function dispatchToRoute($request)
{
$withRoute = $this->app->config->get('app.with_route', true) ? function () {
$this->loadRoutes();
} : null;
return $this->app->route->dispatch($request, $withRoute);
}
/**
* 加载全局中间件
*/
protected function loadMiddleware(): void
{
if (is_file($this->app->getBasePath() . 'middleware.php')) {
$this->app->middleware->import(include $this->app->getBasePath() . 'middleware.php');
}
}
Arguments
Closure($request) {#28 …4}
/www/wwwroot/bd/vendor/topthink/framework/src/think/Http.php
return $this->isBind;
}
/**
* 执行应用程序
* @access public
* @param Request|null $request
* @return Response
*/
public function run(Request $request = null): Response
{
//初始化
$this->initialize();
//自动创建request对象
$request = $request ?? $this->app->make('request', [], true);
$this->app->instance('request', $request);
try {
$response = $this->runWithRequest($request);
} catch (Throwable $e) {
$this->reportException($e);
$response = $this->renderException($request, $e);
}
return $response;
}
/**
* 初始化
*/
protected function initialize()
{
if (!$this->app->initialized()) {
$this->app->initialize();
}
}
/**
Arguments
/www/wwwroot/bd/public/index.php
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2019 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// [ 应用入口文件 ]
namespace think;
require __DIR__ . '/../vendor/autoload.php';
// 执行HTTP应用并响应
$http = (new App())->http;
$response = $http->run();
$response->send();
$http->end($response);