php - “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);
论据
- “类 App\Http\Controllers\pagescontroller 不存在”
解决方案
我已经得到了答案,并且觉得应该把它放在这里给那些有类似问题的人。我只是按照 cbaconnier 的指示将大写变为小写。就是这样,它立即加载。
事实上,我用 PagesController 保存了我的 pagescontroller(位于:app/Http/controllers/pagescontroller)。这就是我一直以来的问题所在。所以我立即将它从“PagesController”更改为“pagescontroller”。该网站已加载。
推荐阅读
- java - Spring Boot Batch:如何使用 CompositeWriter 和自定义 ItemWriter 实现多线程步骤
- mql5 - 1 在 mql5 上的每根蜡烛功能买入或卖出
- javascript - 如何设置与服务调用绑定的表单提交按钮,该按钮必须在 Angular/TypeScript 中提交之前完成?
- unity3d - 网格具有重叠的面/三角形
- r - 如何根据条件为哑铃图中的点着色?
- python-3.x - 将列表分配为 Dask-Dataframe 列
- flutter - 我应该如何正确处理代码中的空错误?
- swift - 将字典转换为数组 - Swift 5
- python - 使用 Keras 和 Kedro 构建自动编码器
- c# - 我如何让一个物体跳跃并落到玩家位置?