void cd(string dn)
cd() changes the current working directory in the LDAP server. It is important to remember that the class emulates the view of a filesystem. This function doesn't actually make any calls to an LDAP server. It merely sets the basedn for subsequent searches. You can pass ".." as the dn to cd, and it will change to the parent DN.


$ldap = new LDAP();
$ldap->cd("cn=Eric, ou=people, dc=ypass, dc=net");
/* Any searching or listing done now will use:
       cn=Eric, ou=people, dc=ypass, dc=net
   as a BASE DN, so we call this our Current Working Directory */
/* Now our CWD is ou=people, dc=ypass, dc=net */