ldap_get_option
ldap_get_option
Get the current value for given option
bool **ldap_get_option** $ldap int $option $value
Sets to the value of the specified option.
value
ldap
Either an instance, returned by
, to get the option for that connection,
or null to get the global option.
LDAP\Connection``ldap_connect
option
The parameter can be one of:
`option`
valueThis will be set to the option value.
return.success
Voorbeeld: Check protocol version
<?php
// $ds is a valid LDAP\Connection instance for a directory server
if (ldap_get_option($ds, LDAP_OPT_PROTOCOL_VERSION, $version)) {
echo "Using protocol version $version\n";
} else {
echo "Unable to determine protocol version\n";
}
?>
Opmerking: > This function is only available when using OpenLDAP 2.x.x OR Netscape Directory SDK x.x.
ldap_set_option