tp5.1的request类问题

浏览:508 发布日期:2021/06/30 分类:ThinkPHP5专区
namespace app\demo\controller;
use think\Request;
class Demo3{

    public function test(Request $request)
    {
                $request = new Request();
        dump($request->get());
    }

}
浏览器输入 http://127.0.0.1/public/demo/demo3/test?name=222&age=333
会出现错误
Argument 1 passed to think\Request::__construct() must be an instance of think\Config, none given, called in
问题在哪里
但是使用静态代理调用 或者 依赖注入 都没问题
最佳答案
评论( 相关
后面还有条评论,点击查看>>