ReflectionException:类HomeController不存在

时间:2016-08-04 11:54:41

标签: php laravel

我用php 5.6运行php laravel framework 4.2。*。在apache服务器中,以某种方式得到错误:

ReflectionException(-1)

类HomeController不存在

打开:

/var/www/example.com/vendor/laravel/framework/src/Illuminate/Container/Container.php

    // 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, $parameters);
    }

    $reflector = new ReflectionClass($concrete);

    // If the type is not instantiable, the developer is attempting to resolve

我尝试过composer dump-autoload,但它没有用。这有什么不对?

这是HomeController

<?php

include_once($_SERVER['DOCUMENT_ROOT'].'/shop/sellerfunctions.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/twitter/TweetPHP.php');

class HomeController extends BaseController {
    protected $layout = 'layouts.master';
}   

和routes.php

<?php

if($_ENV['LARAVEL_ENV'] != 'local') Route::when('*', 'secure');

Route::get('/','HomeController@showWelcome');

0 个答案:

没有答案