PHP Lover 期待大家的加入!
刚建立了一个  PHP Lover  群
希望大家在一起开心交流PHP程序语言!
群号码:54869225

解决方案 »

  1.   

    问题解决  方法如下
    //*****************************
    /*  GET USER INFO FROM LDAP  */
    //*****************************
    // Designate a few variables
    if(!$ad = ldap_connect($_ACONFIG['host']))
    $err[] =  _("Could not connect",true);// Set version number
    if(!ldap_set_option($ad, LDAP_OPT_PROTOCOL_VERSION, 3))
    $err[] = _("ad connect err",true);// Binding to ldap server
    if(!$bd = ldap_bind($ad, $_ACONFIG['user'], $_ACONFIG['pswd']))
    $err[] = _("ad connect err",true);// select OU from AD
    if(!$search_ou=@ldap_search($ad,$_ACONFIG['dn'],"(ou=*)",array( "ou")))
    $err[] = _("ldap search failed",true);$entries_ou = ldap_get_entries($ad, $search_ou);ldap_unbind($ad);