类配置不存在(-1)

时间:2017-08-30 16:00:06

标签: php laravel

导致此错误的原因以及如何解决此问题?

[ReflectionException] 
Class config does not exist (-1)
/var/www/lifepoint.club/htdocs/local/external_api/version/v1.0/source/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:729
#0: ReflectionClass->__construct(string)
    /var/www/lifepoint.club/htdocs/local/external_api/version/v1.0/source/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:729
#1: Illuminate\Container\Container->build(string)
    /var/www/lifepoint.club/htdocs/local/external_api/version/v1.0/source/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:608
#2: Illuminate\Container\Container->resolve(string)
    /var/www/lifepoint.club/htdocs/local/external_api/version/v1.0/source/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:575
#3: Illuminate\Container\Container->make(string)
    /var/www/lifepoint.club/htdocs/local/external_api/version/v1.0/source/laravel/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:106
#4: app(string)
    /var/www/lifepoint.club/htdocs/local/external_api/version/v1.0/source/laravel/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:269
#5: config(string, boolean)
    /var/www/lifepoint.club/htdocs/local/external_api/version/v1.0/source/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:211
#6: Illuminate\Foundation\Exceptions\Handler->convertExceptionToResponse(object)
    /var/www/lifepoint.club/htdocs/local/external_api/version/v1.0/source/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:175
#7: Illuminate\Foundation\Exceptions\Handler->prepareResponse(object, object)
    /var/www/lifepoint.club/htdocs/local/external_api/version/v1.0/source/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:119
#8: Illuminate\Foundation\Exceptions\Handler->render(object, object)
    /var/www/lifepoint.club/htdocs/local/external_api/version/v1.0/source/laravel/app/Exceptions/Handler.php:47
#9: App\Exceptions\Handler->render(object, object)
    /var/www/lifepoint.club/htdocs/local/external_api/version/v1.0/source/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:326
#10: Illuminate\Foundation\Http\Kernel->renderException(object, object)
    /var/www/lifepoint.club/htdocs/local/external_api/version/v1.0/source/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:120
#11: Illuminate\Foundation\Http\Kernel->handle(object)
    /var/www/lifepoint.club/htdocs/local/external_api/version/v1.0/source/laravel/public/index.php:54

代码列表 web.php

<?php

Route::get('bitrix', 'Bitrix\BitrixCoreRequare@bcrIndex');

Route::get('/', function () {
    return view('welcome');
});

代码列表 BitrixCoreRequare.php

命名空间App \ Http \ Controllers \ Bitrix;

使用App \ Http \ Controllers \ Controller;

class BitrixCoreRequare extends Controller
{
    /**
     * bcrRequarePrologAfter - подключение ядра Битрикс (prolog_after)
     */
        public function bcrIndex ()
        {
            $_SERVER["DOCUMENT_ROOT"] = '/var/www/lifepoint.club/htdocs';

            define('NO_KEEP_STATISTIC', true);
            define('NOT_CHECK_PERMISSIONS', true);

            require($_SERVER["DOCUMENT_ROOT"].'/bitrix/modules/main/include/prolog_before.php');

            $lower = ToLower("АБВГД ABCDEF");
            echo "Нижний регистр: ".$lower;

            require($_SERVER["DOCUMENT_ROOT"].'/bitrix/modules/main/include/epilog_after.php');
        }

方法 bcrIndex()已被执行,但错误并未被闹鬼!

enter image description here

尝试作曲家更新

enter image description here

尝试 composer dump-autoload

enter image description here

0 个答案:

没有答案