致命错误:找不到类“IlluminateFoundationApplication&q

Fatal error: Class #39;IlluminateFoundationApplication#39; not found(致命错误:找不到类“IlluminateFoundationApplication)
本文介绍了致命错误:找不到类“IlluminateFoundationApplication"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我打开使用 laravel 5 制作的网站时出现以下错误

I am getting following error when I open my site which is made using laravel 5

致命错误:在第 14 行的 C:cmsootstrapapp.php 中找不到 Class 'IlluminateFoundationApplication'

Fatal error: Class 'IlluminateFoundationApplication' not found in C:cmsootstrapapp.php on line 14

我尝试删除供应商文件夹和 composer.lock 文件并运行 composer install 它不起作用我尝试运行 PHP artisan optimize 但它显示错误

I have tried removing vendor folder and composer.lock file and running composer install it's not working I tried running PHP artisan optimize but it shows error

致命错误:找不到类'IlluminateFoundationApplication'

Fatal error: Class'IlluminateFoundationApplication' not found

有什么办法可以解决这个问题吗?

Is there any way to solve this problem?

一旦我使用了创建模型的 php artisan make:model Page 命令,这个问题就出现了,但是当我访问该站点时会显示上述错误此外,如果使用 Laravel 的本地开发服务器,则只有在使用 wamp 服务器时才会出现此类问题

Edited: This problem aroused as soon as I used the php artisan make:model Page command which did create the model but then the above error gets displayed when I access the site Also If use the Laravel's Local Development Server no such problem arises only if I use wamp server

推荐答案

在我的情况下,我没有完整的供应商依赖项(composer 文件在原始安装期间搞砸了) - 所以运行任何 artisan 命令都会导致失败.

In my situation, I didn't have the full vendor dependencies in place (composer file was messed up during original install) - so running any artisan commands caused a failure.

我能够使用 --no-scripts 标志来防止 artisan 在它被包含之前执行.一旦我的依赖关系到位,一切都按预期工作.

I was able to use the --no-scripts flag to prevent artisan from executing before it was included. Once my dependencies were in place, everything worked as expected.

composer update --no-scripts

这篇关于致命错误:找不到类“IlluminateFoundationApplication"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Convert JSON integers and floats to strings(将JSON整数和浮点数转换为字符串)
in php how do I use preg replace to turn a url into a tinyurl(在php中,如何使用preg替换将URL转换为TinyURL)
all day appointment for ics calendar file wont work(ICS日历文件的全天约会不起作用)
trim function is giving unexpected values php(Trim函数提供了意外的值php)
Basic PDO connection to MySQL(到MySQL的基本PDO连接)
PHP number_format returns 1.00(Php number_Format返回1.00)