以下调用方法自选一种,哪种好玩你就用哪种。 第一种:助手函数调用 Request()->controller() //获取控制器名 Request()->action() //获取方法名 第二种:门面函数facade的静态调用 \think\facade\Request::action() \think\facade\Request::controller() 第三种:app类的静态调用,注意此App为 use think\facade\App; use think