mirror of
https://github.com/php/php-src.git
synced 2024-12-14 20:33:36 +08:00
14 lines
438 B
PHP
14 lines
438 B
PHP
<?php
|
|
require_once 'connect.inc';
|
|
|
|
function skipifunsupportedcontrol($oid)
|
|
{
|
|
global $host, $port, $user, $passwd, $protocol_version, $base;
|
|
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
|
$result = ldap_read($link, '', '(objectClass=*)', ['supportedControl']);
|
|
if (!in_array($oid, ldap_get_entries($link, $result)[0]['supportedcontrol'])) {
|
|
die(sprintf("skip Unsupported control %s", $oid));
|
|
}
|
|
}
|
|
?>
|