首页> 实战笔录 >PHP开发笔记 >ThinkPHP ThinkPHP
TP6报错:Non-static method think\Request::controller() should not be called statically
作者:小萝卜 2020-06-23 【 TP6 】 浏览 4974
简介TP6报错:Non-static method think\Request::controller() should not be called statically
问题描述:
在TP6中使用request获取当前控制器名称时报错了:Non-static method think\Request::controller() should not be called statically
解决办法:
引入request框架文件
use think\facade\Request;
很赞哦! (0)
相关文章
- url的301跳转 tp3.2 tp5.0实现方式
- tp6调试模式的开启与关闭
- TP6获取上传文件的后缀名
- TP6 TP5一键生成sitemap站点地图索引文件 代码分享
- TP5 databackup拓展插件,实现数据库备份下载还原代码分享
- SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Attr_id' in 'where clause'
- TinkPHP6-tp6实现全站静态化方法
- tp5使用jwt生成token,做api的用户认证
- tp6表单验证提交之后报错Call to a member function set() on null
- TP3.2模板内使用U方法详细介绍
