所以,我正在尝试进行Ldap身份验证,遵循以下文档
https://zf2.readthedocs.org/en/latest/user-guide/skeleton-application.html
我只是用'Auth'模块替换'Album'模块,并使用Ldap autentication的示例代码
https://zf2.readthedocs.org/en/latest/modules/zend.authentication.adapter.ldap.html
但是我收到这个错误,当我提交带有登录数据的表单时,Zend无法找到Ldap类.
致命错误:在第139行的C:\ wamp\www\sade\vendor\zendframework\zend-authentication\src\Adapter\Ldap.php中找不到类'Zend\Ldap\Ldap'
我正在使用作曲家,对于zend框架和模块的atuoloader,我已经有错误相关的类没有找到但是我自己的类,而不是像Ldap这样的Zend类.
谢谢.
这是文件和文件夹的结构
/module
/Auth
/config
module.config.php
/src
/Auth
/Controller
AuthController.php
/Form
AuthForm.php
/Model
Auth.php
/view
/auth
/auth
index.php
Module.php
Run Code Online (Sandbox Code Playgroud)
以及该模块的主要代码:
module.config.php
return array(
'controllers' => array(
'invokables' => array(
'Auth\Controller\Auth' => 'Auth\Controller\AuthController',
),
),
'router' => array(
'routes' => array(
'auth' => array(
'type' => 'segment',
'options' => array(
'route' => '/auth[/:action][/:id]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id' => '[0-9]+',
),
'defaults' => array(
'controller' => 'Auth\Controller\Auth',
'action' => 'index', …Run Code Online (Sandbox Code Playgroud)