简体   繁体   English

找不到 Adldap 类接口

[英]Adldap class Interface not found

<?php

include(dirname(__FILE__).'/Adldap.php');
use Adldap\Adldap;

$config = array(
        'account_suffix' => "@canoas.unilasalle.edu.br",

        'domain_controllers' => array("svr-dc01.canoas.unilasalle.edu.br"),

        'base_dn' => 'dc=canoas,dc=unilasalle,dc=edu,dc=br',

        'admin_username' => 'login',

        'admin_password' => '******',
    );

    $ad = new Adldap($config);
?>

Tried visiting Fatal error: Class 'adLDAP' not found , which worked, then I got this error after testing the class:尝试访问Fatal error: Class 'adLDAP' not found ,它有效,然后在测试该类后出现此错误:

Fatal error: Class 'Adldap\\Interfaces\\ConnectionInterface' not found in C:\\xampp\\htdocs\\ad\\index.php on line 24致命错误:在第 24 行的 C:\\xampp\\htdocs\\ad\\index.php 中找不到类“Adldap\\Interfaces\\ConnectionInterface”

I don't know whats going on since the class Adldap.php does the includes.我不知道发生了什么,因为类 Adldap.php 做了包含。

If you downloaded the zip file of adLDAP from here ( http://sourceforge.net/projects/adldap/files/adLDAP/adLDAP_4.0.4/adLDAP_4.0.4r2.zip/download ), when you extract it it will have two folders, 'examples' and 'src'.如果您从这里下载了 adLDAP 的 zip 文件( http://sourceforge.net/projects/adldap/files/adLDAP/adLDAP_4.0.4/adLDAP_4.0.4r2.zip/download ),当您解压缩它时,它将有两个文件夹, '例子' 和 'src'。 Copy the entire src folder into your project where you currently have Adldap.php Then you can include(dirname(__FILE__).'/src/Adldap.php');将整个 src 文件夹复制到您当前拥有Adldap.php项目中,然后您可以include(dirname(__FILE__).'/src/Adldap.php'); , and the class should then have access to all of the other files it depends on. ,然后该类应该可以访问它所依赖的所有其他文件。

Or, as mentioned in the comment, use composer and follow the installation instructions here: https://github.com/adldap/adLDAP#installation .或者,如评论中所述,使用 composer 并按照此处的安装说明进行操作: https : //github.com/adldap/adLDAP#installation

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM