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

拥有回忆 提交于 2019-11-28 19:43:46

1.

执行某个控制器的方法时(http://test.com:9501/?s=index/index/test)其中这个方法必须是return 否则会报错

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

 

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!