Adldap class Interface not found

时间:2015-07-31 20:28:23

标签: php adldap

<?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\Interfaces\ConnectionInterface' not found in C:\xampp\htdocs\ad\index.php on line 24

I don't know whats going on since the class Adldap.php does the includes.

1 个答案:

答案 0 :(得分:1)

如果你从这里(http://sourceforge.net/projects/adldap/files/adLDAP/adLDAP_4.0.4/adLDAP_4.0.4r2.zip/download)下载了adLDAP的zip文件,当你解压缩它时,它会有两个文件夹,'examples'和'src'。将整个src文件夹复制到您当前拥有的项目Adldap.php然后您可以include(dirname(__FILE__).'/src/Adldap.php');,然后该类应该可以访问它所依赖的所有其他文件。

或者,如评论中所述,请使用编辑器并按照此处的安装说明进行操作:https://github.com/adldap/adLDAP#installation