函式:ldap_list() |
ldap_list列出简表。 语法: int ldap_list(int handle, string base_dn, string filter, array [attributes]); 传回值: 整数 函式种类: 网路系统
本函式用来列出单层 (One Level) 的资料,实际上它等于ldap_searchldap_search(),只是将值域改成 LDAP_SCOPE_ONELEVEL,本函式作用有点像 DOS 的 dir 或是 UNIX 的 ls。参数 handle 为开启 LDAP 的代号。参数 base_dn 为最基本的 dn 条件值,例如包括 o 和 c 二栏位。参数 filter 为布林条件,它的语法可以在 Netscape 站上找一份 dirsdkpg.pdf 档案,其中的 Search Syntax 一部份有详细的说明。参数 attributes 可省略,用来设定更细的列出属性。
这个范例为片段程式
|