/ / $ds is a valid link identifier for a directory server / / control with no value $ctrl1 = array( "oid "= "1.2.752.58.10.1", "iscritical" = TRUE); / / iscritical defaults to FALSE $ctrl2 = array("oid "= "1.2.752.58.1.10", "value" = "magic"); / / try to set both controls if (!ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array($ctrl1, $ctrl2))) echo "Failed to set server controls";
/ / $ds doit ecirc; tre une ressource de connexion valide / / controle sans valeur $ctrl1 = array("oid "= "1.2.752.58.10.1", "iscritical" = TRUE); / / iscritical vaut par d eacute;faut FALSE $ctrl2 = array("oid "= "1.2.752.58.1.10", "value" = "magic"); / / essayez d'utiliser les deux contr ocirc;les if (!ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array($ctrl1, $ctrl2))) echo "Impossible de modifier les contr ocirc;les du serveur";