codeigniter 找不到错误视图文件,无法呈现异常跟踪,代码引发器4

s3fp2yjn  于 2022-12-06  发布在  其他
关注(0)|答案(1)|浏览(127)

我无法访问本地主机(http://localhost:8081/)。
错误:

The error view files were not found. Cannot render exception trace.
jw5wzhpr

jw5wzhpr1#

此错误来自 “缺少错误视图文件”
1.确保app/Views/errors/下有所有相关的文件和目录。

├───app
|   |
│   └───Views
        └───errors
            ├───cli
            │       error_404.php
            │       error_exception.php
            │       production.php
            │
            └───html
                    debug.css
                    debug.js
                    error_404.php
                    error_exception.php
                    production.php

1.确保正确设置了文件app/Config/Exceptions.php中的以下配置变量。

/**
     * --------------------------------------------------------------------------
     * Error Views Path
     * --------------------------------------------------------------------------
     * This is the path to the directory that contains the 'cli' and 'html'
     * directories that hold the views used to generate errors.
     *
     * Default: APPPATH.'Views/errors'
     *
     * @var string
     */
    public $errorViewPath = APPPATH . 'Views/errors';

相关问题