前端技术 php/thinkphp
在thinkcmf中使用悟空404插件,卸载后错误提示没了。


之前的错误提示是这样的:

image.png

后来安装了“悟空404插件”,又卸载了,但是错误提示变成了:

image.png

经过研究发现是错误提示的模板没添加对,只好去看“悟空404插件”的代码,发现了这个:

 public function uninstall()
    {
        // 动态修改异常页面路径
        cmf_set_dynamic_config([
            'app' => [
                'exception_tmpl' => CMF_ROOT . 'vendor/topthink/framework/src/tpl/think_exception.tpl'
            ]
        ]);
        return true;
    }

这里卸载后他把错误提示的模板改成了,vendor/thinkphp/tpl/think_exception.tpl但是我用的thinkcmf版本压根没有thinkphp这个文件夹:

image.png

最后我在

vendor/topthink/framework/src/tpl/think_exception.tpl

找到了这个模板,所以进行了修改:

public function uninstall()
    {
        // 动态修改异常页面路径
        cmf_set_dynamic_config([
            'app' => [
                'exception_tmpl' => CMF_ROOT . 'vendor/topthink/framework/src/tpl/think_exception.tpl'
            ]
        ]);
        return true;
    }

因为不知道这个在哪里设置,所以就把悟空404插件又安装了一下,然后修改下面的代码再次卸载,问题解决。

友情链接:
Copyright © 2020-2023 春藤建站-chunten All Rights Reserved
备案号:豫ICP备20020705号-2 请在后台设置"网站信息"设置"公网安备" 51LA统计
0.307011s