framework icon indicating copy to clipboard operation
framework copied to clipboard

http初始化问题

Open han3367775 opened this issue 5 years ago • 2 comments

6.0.4调整了http初始化位置。 目前测试是在Services执行后再进行初始化。 执行http run() 方法时,会找不到依赖注入的 Request 对象,然后重新执行make request.

han3367775 avatar Sep 29 '20 07:09 han3367775

就是因为之前 服务里绑定的Request无效 所以才提前初始化的

yunwuxin avatar Sep 30 '20 06:09 yunwuxin

我在入口文件中,做了如下改动: `namespace think; require DIR . '/../vendor/autoload.php';

$app = new App();

// 执行HTTP应用并响应 $http = $app->http;

$response = $http->run($app->request);

$response->send();

$http->end($response);`

han3367775 avatar Oct 11 '20 02:10 han3367775