我使用的是苗条的框架来编写自己的API,一切都很好,但是当我添加slim-basic-auth库来保护我的API并对其进行测试时…。我总是会收到此错误:
未捕获的错误:在中找不到类'Tuupola \ Middleware \ HttpBasicAuthentication' D:\ xampp \ htdocs \ mydatabase \ public \ index.php:22
对此有任何帮助吗?
我安装了该库并像在教程中一样使用它
$app->add(new Tuupola\Middleware\HttpBasicAuthentication([
"secure"=>false,"users" => [
"username@#" => "password#@" ]
]));