首页> 实战笔录 >PHP开发笔记 >ThinkPHP ThinkPHP
TP6报错:Non-static method think\Request::controller() should not be called statically
作者:小萝卜 2020-06-23 【 TP6 】 浏览 4647
简介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)
相关文章
- TP6阿里云OSS上传报SSL certificate problem:unable to get local issuer certificate
- url的301跳转 tp3.2 tp5.0实现方式
- TP5 自定义验证器
- PayPal支付ThinkPHP3.2源代码
- PHP/ThinkPHP实现用户一段时间没有操作,系统自动退出
- TP5/6验证器验证身份号(使用自定义验证规则)
- TP3.2同时操作多个数据库
- SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Attr_id' in 'where clause'
- TP5 添加平铺水印并设置水印之间的间距
- TP6 TP5一键生成sitemap站点地图 代码分享
