©
This document uses PHP Chinese website manual Release
(PHP 4, PHP 5)
ldap_close — 别名 ldap_unbind()
此函数是该函数的别名: ldap_unbind() .
[#1] [2001-07-20 11:15:35]
<?php
$ds=ldap_connect("localhost"); // assuming the LDAP server is on this host
if ($ds) {
$r=ldap_bind($ds,"cn=root, o=My Company, c=US", "secret");
$info["cn"]="Roberto Celestino";
$info["sn"]="Roberto";
$info["mail"]="rcelestino@here.and.now";
$info["objectclass"]="person";
// add data to directory
$r=ldap_add($ds, "cn=Celestino Roberto, o=Mi Compania, c=US", $info);
//Close the link apointed by the identified $ds (get with ldap_connect)
ldap_close($ds);
}
?>