tp5.1.38 支持原生swoole 須要注意的問題

1.php

執行某個控制器的方法時(http://test.com:9501/?s=index/index/test)其中這個方法必須是return 若是是echo 必須加 exit 不然會報錯 thinkphp

2.修改thinkphp源碼this

thinkphp\library\think\Request.php3d

修改public function pathinfo()方法server

註釋blog

if (is_null($this->pathinfo)) {判斷條件註釋掉

修改public function path()方法get

註釋源碼

if (is_null($this->path)) {判斷條件註釋掉

修改(解決獲取不到請求參數的問題報錯method not exists:think\Request->filterValue)it

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

改成io

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

 

須要注意的是,tp5.1.38這個版本在

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

中不須要重寫server和header

相關文章
相關標籤/搜索