致命错误:未捕获的异常"反射异常"



我在运行php代码时遇到了类似的错误(未捕获的异常'ReflectionException')。但是我还没有运气修复它。

Uncaught exception 'ReflectionException' with message 'Class path.base does not exist' in /home/localblu/staging/vendor/laravel/framework/src/Illuminate/Container/Container.php:504 Stack trace: 
#0 /home/localblu/staging/vendor/laravel/framework/src/Illuminate/Container/Container.php(504): ReflectionClass->__construct('path.base') 
#1 /home/localblu/staging/vendor/laravel/framework/src/Illuminate/Container/Container.php(428): IlluminateContainerContainer->build('path.base', Array) 
#2 /home/localblu/staging/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(462): IlluminateContainerContainer->make('path.base', Array)
#3 /home/localblu/staging/vendor/laravel/framework/src/Illuminate/Container/Container.php(806): IlluminateFoundationApplication->make('path.base')
#4 /home/localblu/staging/bootstrap/start.php(11): IlluminateContainerContainer->offsetGet('path.base') 
#5 /home/localblu/staging/public/index.php(35): require_once('/home/localblu/...') 
#6 {main} thrown in /home/localblu/staging/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 504

这是我的作曲家.json文件:

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "laravel/framework": "4.2.*",
            "phpunit/phpunit": "3.7.*",
    "davejamesmiller/laravel-breadcrumbs": "~2.3"
},
"autoload": {
    "classmap": [
        "app/commands",
        "app/controllers",
        "app/models",
        "app/database/migrations",
        "app/database/seeds",
        "app/tests/TestCase.php"
    ]
},
"scripts": {
    "post-install-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize"
    ],
    "post-update-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize"
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ]
},
"config": {
    "preferred-install": "dist"
},
"minimum-stability": "stable"

}

你们能帮我吗?

运行

 composer dump-autoload

如评论中所述或

 composer dump-autoload -o

这为我解决了问题

在Laravel项目文件夹中,然后转到app/Exceptions/Handler.php并请评论该行app('sneaker')->captureException($exception);然后你会得到确切的错误,然后解决错误

相关内容

  • 没有找到相关文章

最新更新