laravel应用程序中index.php是所有请求的入口。当用户提交一个form或者访问一个网页时,首先由kernel捕捉到该session PHP运行环境下的用户数据,
生成一个request对象,该对象再传入routing系统寻址到对应的controller,最终由controller形成response返回给浏览器,完成整个网页请求的生命周期。
$kernel->handle $request=Illuminate\Http\Request::capture->createFromBase->createFromGlobals->
$request = self::createRequestFromFactory($_GET, $_POST, array(), $_COOKIE, $_FILES, $server);(Symfony\Component\HttpFoundation\Request::createRequestFromFactory)
$response = $this->sendRequestThroughRouter($request); Kernel.php(Illuminate\Foundation\Http\Kernel)
$this->app[‘events‘]->fire(‘kernel.handled‘, [$request, $response]);return $response; response->send();
时间: 2024-10-09 10:09:17