找回密码
 立即注册

thinkphp8.x报错Call to a member function buildToken() on null [复制链接]

admin 2024-8-16 14:20:46 2403
thinkphp8.x报错Call to a member function buildToken() on null
think问题解决.jpg
  1. $token = $this->request->buildToken('__token__', 'sha1');
复制代码

说明没有引用到,解决方法:
  1. $token = Request::buildToken('__token__', 'sha1');
复制代码
use think\facade\Request;

0 回复

发布新话题
搜索
返回顶部