<?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);
?>尝试访问Fatal error: Class 'adLDAP' not found,它成功了,然后我在测试类之后得到了这个错误:
致命错误:在第24行的C:\xampp\htdocs\ad\index.php中找不到‘Adldap\接口\ConnectionInterface’类
我不知道发生了什么,因为Adldap.php类做了包含。
发布于 2015-07-31 21:31:40
如果您从这里下载了adLDAP的zip文件(4.0.4r2.zip/download),那么当您解压它时,它将有两个文件夹,即“示例”和“src”。将整个src文件夹复制到您当前拥有Adldap.php的项目中,然后您可以使用include(dirname(__FILE__).'/src/Adldap.php');,然后该类应该可以访问它所依赖的所有其他文件。
或者,正如注释中提到的,使用composer并按照这里的安装说明:https://github.com/adldap/adLDAP#installation。
https://stackoverflow.com/questions/31754666
复制相似问题