0
点赞
收藏
分享

微信扫一扫

tp6 $this->success() $this->error() redirect() 这种转跳方法已取消(Call to undefined method xxx::success())


tp6 $this->success() $this->error() redirect() 这种转跳方法已取消(Call to undefined method xxx::success())_composer

tp6 成功后跳转出现错误:Call to undefined method app\admin\controller\Menu::success()

tp6 $this->success() $this->error() redirect() 这种转跳方法已取消(Call to undefined method xxx::success())_composer_02

官方系统不再提供基础控制器类​​think\Controller​​​,原来的​​success​​​、​​error​​​、​​redirect​​​和​​result​​方法需要自己在基础控制器类里面实现。

 

解决办法:

安装下面的扩展用于支持旧版本的跳转操作

composer require liliuwei/thinkphp-jump

在BaseController.php文件中

tp6 $this->success() $this->error() redirect() 这种转跳方法已取消(Call to undefined method xxx::success())_php_03

use \liliuwei\think\Jump;

use Jump;

官方文档:​​https://www.kancloud.cn/manual/thinkphp6_0/1037654​​

举报

相关推荐

0 条评论