我有以下功能未定義指數預警LDAP屬性/關聯數組
function getContactInfo1() {
$filter = "(cn="."CRALT - Admins".")";
$result = ldap_search($this->con, "OU=Distribution Groups,OU=Groups,DC=rim,DC=net", $filter, array('managedBy','msExchCoManagedByLink'));
$entry = ldap_get_entries($this->con, $result);
return array('owner'=>$entry[0]['managedBy'][0],'altOwner'=>$entry[0]['msExchCoManagedByLink'][0]);
}
當我嘗試調用它,它給了我下面的錯誤: -
C:\>php C:\Apache2.2\htdocs\1.php
Hitesh Thakur<hr>PHP Notice: Undefined index: managedBy in C:\Apache2.2\htdocs
\cralt_dev\LDAPutils.class.php on line 28
PHP Notice: Undefined index: msExchCoManagedByLink in C:\Apache2.2\htdocs\cral
t_dev\LDAPutils.class.php on line 28
請幫助。
謝謝。它有幫助。 –