首页 > 解决方案 > “ReflectionClass:Pagescontroller 不存在”错误

问题描述

我有一个 laravel 5.7 应用程序,它在我的本地服务器上运行良好。但是在将其部署到共享 cpanel 服务器并在 index.php 页面上进行了必要的更正时,我仍然收到 Pagescontroller 不存在的错误。请我需要帮助。

下面是错误代码:

/home/ondi/miniblog/vendor/laravel/framework/src/Illuminate/Container/Container.php }

/**
 * Instantiate a concrete instance of the given type.
 *
 * @param  string  $concrete
 * @return mixed
 *
 * @throws \Illuminate\Contracts\Container\BindingResolutionException
 */
public function build($concrete)
{
    // If the concrete type is actually a Closure, we will just execute it and
    // hand back the results of the functions, which allows functions to be
    // used as resolvers for more fine-tuned resolution of these objects.
    if ($concrete instanceof Closure) {
        return $concrete($this, $this->getLastParameterOverride());
    }

    $reflector = new ReflectionClass($concrete);

论据

  1. “类 App\Http\Controllers\pagescontroller 不存在”

标签: phplaravel-5.7

解决方案


我已经得到了答案,并且觉得应该把它放在这里给那些有类似问题的人。我只是按照 cbaconnier 的指示将大写变为小写。就是这样,它立即加载。

事实上,我用 PagesController 保存了我的 pagescontroller(位于:app/Http/controllers/pagescontroller)。这就是我一直以来的问题所在。所以我立即将它从“PagesController”更改为“pagescontroller”。该网站已加载。


推荐阅读