array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'pt_BR', ), 'this' => array ( 0 => 'function.ldap-err2str.php', 1 => 'ldap_err2str', ), 'up' => array ( 0 => 'ref.ldap.php', 1 => 'Funções do LDAP', ), 'prev' => array ( 0 => 'function.ldap-dn2ufn.php', 1 => 'ldap_dn2ufn', ), 'next' => array ( 0 => 'function.ldap-errno.php', 1 => 'ldap_errno', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/ldap/functions/ldap-err2str.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
ldap_err2str — Convert LDAP error number into string error message
Returns the string error message explaining the error number
errno
. While LDAP errno numbers are standardized,
different libraries return different or even localized textual error
messages. Never check for a specific error message text, but always use an
error number to check.
errno
The error number.
Returns the error message, as a string.
Exemplo #1 Enumerating all LDAP error messages
<?php
for ($i=0; $i<100; $i++) {
printf("Error $i: %s<br />\n", ldap_err2str($i));
}
?>