你的<?怎么会在下面??<?
$ds=ldap_connect("192.168.7.2");  // 连上 LDAP 服务器
if ($ds) {
 
 // 系住恰当的 dn
  $r=ldap_bind($ds,"cn=root, o=CA, c=US", "123456");
  if($r) echo "bind ok!\n";
  // 预先准备好新条目的资料
  $info["cn"]="Wilson Peng";
  $info["sn"]="Peng";
  $info["mail"]="[email protected]";
  $info["objectclass"]="person";
  // 加入新条目
  $r=ldap_add($ds,"cn=Wilson Peng, o=CA, c=US", $info);
  ldap_close($ds);
} else {
  echo "抱歉,无法连上 LDAP 服务器。"; 
}
?>

解决方案 »

  1.   

    真让人羡慕,请问在Windows环境中能装ldap客户端吗?怎么装?哪里有?谢谢!!
      

  2.   

    装SUN的iPlanet Directory Server
      

  3.   

    欲使用 LDAP 伺服器功能要先在 Web 伺服器安装 LDAP 客户端程式,较着名的有美国密西根大学的 ldap-3.3 套件或者是 Netscape 的 Directory SDK。可到下列网址找回来安装
    Netscape http://developer.netscape.com/tech/directory/ 
    密西根大学 http://www.umich.edu/~dirsvcs/ldap/index.html 
    OpenLDAP 计划 http://www.openldap.com 
    LDAP World http://elvira.innosoft.com/ldapworld