简体   繁体   English

“ReflectionClass:Pagescontroller 不存在”错误

[英]"ReflectionClass: Pagescontroller Does Not Exist" Error

I have a laravel 5.7 app which works very well on my local server.我有一个 laravel 5.7 应用程序,它在我的本地服务器上运行良好。 But on deploying it to shared cpanel server and haven made the necessary correction on the index.php page, I still get this error that Pagescontroller Does Not Exist.但是在将它部署到共享的 cpanel 服务器并且没有在 index.php 页面上进行必要的更正时,我仍然收到 Pagescontroller 不存在的错误。 Please I will need help.请我需要帮助。

Below are the error code:以下是错误代码:

/home/ondi/miniblog/vendor/laravel/framework/src/Illuminate/Container/Container.php } /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);

Arguments参数

  1. "Class App\Http\Controllers\pagescontroller does not exist" “类 App\Http\Controllers\pagescontroller 不存在”

I have got the answer and felt should drop it here for those with similar issue.我已经得到了答案,并且觉得对于那些有类似问题的人应该把它放在这里。 I just followed cbaconnier's instruction on changing the uppercase to lowercase.我只是按照 cbaconnier 关于将大写字母更改为小写字母的说明进行操作。 And that's it, it loaded at once.就是这样,它立即加载。

Fact is that i saved my pagescontroller (which is found in: app/Http/controllers/pagescontroller) with PagesController.事实上,我用 PagesController 保存了我的 pagescontroller(位于:app/Http/controllers/pagescontroller)。 That's where my problem was coming from all those while.那就是我的问题来自所有这些的地方。 So immediately I changed it from "PagesController" to "pagescontroller".所以我立即将它从“PagesController”更改为“pagescontroller”。 The site loaded at ones.该网站加载了一个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM