<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.imap.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.imap-listscan.php',
    1 => 'imap_listscan',
    2 => 'Returns the list of mailboxes that matches the given text',
  ),
  'up' => 
  array (
    0 => 'ref.imap.php',
    1 => 'IMAP 函数',
  ),
  'prev' => 
  array (
    0 => 'function.imap-listmailbox.php',
    1 => 'imap_listmailbox',
  ),
  'next' => 
  array (
    0 => 'function.imap-listsubscribed.php',
    1 => 'imap_listsubscribed',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/imap/functions/imap-listscan.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.imap-listscan" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imap_listscan</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">imap_listscan</span> &mdash; <span class="dc-title">Returns the list of mailboxes that matches the given text</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.imap-listscan-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>imap_listscan</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="class.imap-connection.php" class="type IMAP\Connection">IMAP\Connection</a></span> <code class="parameter">$imap</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$reference</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$pattern</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$content</code></span><br>): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Returns an array containing the names of the mailboxes that have
   <code class="parameter">content</code> in the text of the mailbox.
  </p>
  <p class="para">
   This function is similar to <span class="function"><a href="function.imap-listmailbox.php" class="function">imap_listmailbox()</a></span>,
   but it will additionally check for the presence of the string
   <code class="parameter">content</code> inside the mailbox data.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.imap-listscan-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    <dt>
<code class="parameter">imap</code></dt><dd><p class="para"><span class="classname"><a href="class.imap-connection.php" class="classname">IMAP\Connection</a></span> 实例。</p></dd>
    
     <dt><code class="parameter">reference</code></dt>
     <dd>
      <p class="para">
       <code class="parameter">reference</code> should normally be just the server 
       specification as described in <span class="function"><a href="function.imap-open.php" class="function">imap_open()</a></span>
      </p>
      <div class="warning"><strong class="warning">警告</strong><p class="simpara">
Passing untrusted data to this parameter is <em>insecure</em>, unless
<a href="imap.configuration.php#ini.imap.enable-insecure-rsh" class="link">imap.enable_insecure_rsh</a> is disabled.
</p></div>
     </dd>
    
    
     <dt><code class="parameter">pattern</code></dt>
     <dd>
      <p class="para">指定在邮箱层级的何处开始查找。</p>
<p class="para">在组成 <code class="parameter">pattern</code> 的字符中可使用两个特殊字符：
 &#039;<code class="literal">*</code>&#039; 和 &#039;<code class="literal">%</code>&#039;。
 &#039;<code class="literal">*</code>&#039; 是指返回所有邮箱目录. 如果将 &#039;<code class="literal">*</code>&#039; 作为
 <code class="parameter">pattern</code> 参数时, 则会返回整个邮箱层级结构。
 &#039;<code class="literal">%</code>&#039; 是指只返回当前级次。
 &#039;<code class="literal">%</code>&#039; 作为 <code class="parameter">pattern</code> 参数则只会返回顶层邮箱；
 &#039;<code class="literal">~/mail/%</code>&#039; 用于 <code class="literal">UW_IMAPD</code>
 则会返回名为 <var class="filename">~/mail</var> 的目录, 但不包含其子目录。</p>
     </dd>
    
    
     <dt><code class="parameter">content</code></dt>
     <dd>
      <p class="para">
       The searched string
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.imap-listscan-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns an array containing the names of the mailboxes that have
   <code class="parameter">content</code> in the text of the mailbox,  或者在失败时返回 <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.imap-listscan-changelog">
  <h3 class="title">更新日志</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>版本</th>
      <th>说明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.1.0</td>
 <td>
  现在 <code class="parameter">imap</code> 参数接受 <span class="classname"><a href="class.imap-connection.php" class="classname">IMAP\Connection</a></span>
  实例，之前接受有效的 <code class="literal">imap</code> <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>。
 </td>
</tr>

    </tbody>
   
  </table>

 </div>

 
 <div class="refsect1 seealso" id="refsect1-function.imap-listscan-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.imap-listmailbox.php" class="function" rel="rdfs-seeAlso">imap_listmailbox()</a> - 别名 imap_list</span></li>
    <li><span class="function"><a href="function.imap-search.php" class="function" rel="rdfs-seeAlso">imap_search()</a> - This function returns an array of messages matching the given search criteria</span></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>