tp5.1.38 支持原生swoole 需要注意的问题

1.tp5.1.38 支持原生swoole 需要注意的问题_第1张图片

执行某个控制器的方法时(http://test.com:9501/?s=index/index/test)其中这个方法必须是return 如果是echo 必须加 exit 否则会报错 tp5.1.38 支持原生swoole 需要注意的问题_第2张图片

2.修改thinkphp源码

thinkphp\library\think\Request.php

修改public function pathinfo()方法

注释

if (is_null($this->pathinfo)) {判断条件注释掉

修改public function path()方法

注释

if (is_null($this->path)) {判断条件注释掉

修改(解决获取不到请求参数的问题报错method not exists:think\Request->filterValue)

private function filterValue(&$value, $key, $filters)

改为

public function filterValue(&$value, $key, $filters)

 

需要注意的是,tp5.1.38这个版本在

$http->on('request', function ($request, $response) {}

中不需要重写server和header

tp5.1.38 支持原生swoole 需要注意的问题_第3张图片

 

 

转载于:https://my.oschina.net/u/3840669/blog/3098724

你可能感兴趣的:(tp5.1.38 支持原生swoole 需要注意的问题)