mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 05:26:57 +08:00
98 lines
3.6 KiB
HTML
98 lines
3.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<title>Count the number of entries in a search</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.ldap-count-entries" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">ldap_count_entries</h1>
|
|
<p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">ldap_count_entries</span> — <span class="dc-title">Count the number of entries in a search</span></p>
|
|
|
|
</div>
|
|
|
|
<div class="refsect1 description" id="refsect1-function.ldap-count-entries-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>ldap_count_entries</strong></span>
|
|
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$link_identifier</code></span>
|
|
, <span class="methodparam"><span class="type">resource</span> <code class="parameter">$result_identifier</code></span>
|
|
) : <span class="type">int</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
Returns the number of entries stored in the result of previous search
|
|
operations.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.ldap-count-entries-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">link_identifier</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
An LDAP link identifier, returned by <span class="function"><a href="ldap_connect.html" class="function">ldap_connect()</a></span>.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">result_identifier</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The internal LDAP result.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.ldap-count-entries-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
Returns number of entries in the result or <strong><code>FALSE</code></strong> on error.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="refsect1 examples" id="refsect1-function.ldap-count-entries-examples">
|
|
<h3 class="title">范例</h3>
|
|
<p class="para">
|
|
<div class="example" id="example-5393">
|
|
<p><strong>Example #1 <span class="function"><strong>ldap-count-entries()</strong></span> example</strong></p>
|
|
<div class="example-contents"><p>
|
|
Retrieve number of entries in the result.
|
|
</p></div>
|
|
<div class="example-contents">
|
|
<div class="phpcode"><pre><span style="color: #000000">
|
|
// $ds is a valid link identifier (see ldap_connect)<br /><br /> $dn = 'ou=example,dc=org';<br /> $filter = '(|(sn=Doe*)(givenname=John*))';<br /> $justthese = array('ou', 'sn', 'givenname', 'mail');<br /><br /> $sr = ldap_search($ds, $dn, $filter, $justthese);<br /><br /> var_dump(ldap_count_entries($ds, $sr));</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
<div class="example-contents"><p>以上例程的输出类似于:</p></div>
|
|
<div class="example-contents screen">
|
|
<div class="cdata"><pre>
|
|
int(1)
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
</p>
|
|
</div>
|
|
|
|
</div></div></div></body></html> |