Slim(php微框架)无法找到类的错误,解决方案

2017-08-25  本文已影响0人  你好667

you should edit your composer.json like that:

"autoload": {
    "psr-4": {
        "App\\": ""
    }
},
"require": {
    // ...
},
"scripts": {
    // ...
}

and dependencies.php

// PagesController
$container['PagesController'] = function ($container)
{
    return new \App\Controller\PagesController; 
};
next, you update your autoload
composer dump-autoload -o
上一篇 下一篇

猜你喜欢

热点阅读