Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Laravel项目不在cpanel中工作面临的错误目标类[App\Http\Controllers\fileController]不存在_Laravel_Cpanel - Fatal编程技术网

Laravel项目不在cpanel中工作面临的错误目标类[App\Http\Controllers\fileController]不存在

Laravel项目不在cpanel中工作面临的错误目标类[App\Http\Controllers\fileController]不存在,laravel,cpanel,Laravel,Cpanel,Laravel项目不在cpanel中工作面临的错误目标类[App\Http\Controllers\fileController]不存在。但项目完全在本地运行,没有错误。 错误图像 route.php AuthorController.php 请帮帮我。高级感谢。错误似乎是直接向前的——您似乎缺少FileController的定义,并且在路由文件中的某个地方调用了控制器 Route::resource('files', 'FilesController'); 要解决类似的问题,请确保

Laravel项目不在cpanel中工作面临的错误目标类[App\Http\Controllers\fileController]不存在。但项目完全在本地运行,没有错误。 错误图像

route.php

AuthorController.php


请帮帮我。高级感谢。

错误似乎是直接向前的——您似乎缺少FileController的定义,并且在路由文件中的某个地方调用了控制器

Route::resource('files', 'FilesController'); 
要解决类似的问题,请确保没有将任何控制器重命名为其他名称,或者只需运行artisan即可

php artisan make:controller FilesController -r 
为了解决这个问题。此外,尝试并坚持使用资源丰富的控制器,因为动词“PUT”、“PATCH”、“GET”等会降低代码的可读性。如果您不想在路由中的一个资源丰富的控制器中公开所有的方法,那么您可以使用

Route::resource('files', 'FilesController')->except('index','show'); 

等等。

欢迎来到so。您能否提供此
fileController
,它应该是
fileController
?由于
AuthorController
不相关。。。请不要张贴代码的图片,代码是文本,可以直接添加到您的问题中