⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ldap_next_attribute.php3

📁 linux操作系统中 php 核心编程所有例程 都是一些很不错的案例
💻 PHP3
字号:
<HTML>
<HEAD>
<TITLE>ldap_next_attribute</TITLE>
</HEAD>
<BODY>
<?
	// connect to LDAP server 
	$ldap=ldap_connect("ldap.itd.umich.edu");
	
	if($ldap)
	{
		// list organizations in the US 
		$dn = "c=US";
		$attributes = array("o");
		$filter = "o=*";

		// perform search 
		$result = ldap_list($ldap, $dn, 
		$filter, $attributes);

		if($result)
		{
			// get all attributes for first entry 
			$entry = ldap_first_entry($ldap, $result);

        	$attribute = ldap_first_attribute($ldap,
			$entry, &$pointer);
			while($attribute)
			{
				print("$attribute<BR>\n");
				$attribute =
				ldap_next_attribute($ldap,
				$entry, &$pointer);
			}

			ldap_free_result($result);
		}
		else
		{
			print("Nothing found");
		}
	
		// close connection 
		ldap_close($ldap);
	}
	else    
	{
		echo "<B>Connection failed!</B>";
	}
?>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -