⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 function.imap-setflag-full.html

📁 php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Sets flags on messages</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.imap-setacl.html">imap_setacl</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.imap-sort.html">imap_sort</a></div> <div class="up"><a href="ref.imap.html">IMAP Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.imap-setflag-full" class="refentry"> <div class="refnamediv">  <h1 class="refname">imap_setflag_full</h1>  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">imap_setflag_full</span> &mdash; <span class="dc-title">Sets flags on messages</span></p> </div> <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type">bool</span> <span class="methodname"><b><b>imap_setflag_full</b></b></span>    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$imap_stream</tt></span>   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$sequence</tt></span>   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$flag</tt></span>   [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$options</tt></span>  ] )</div>  <p class="para rdfs-comment">   Causes a store to add the specified <i><tt class="parameter">flag</tt></i> to the   flags set for the messages in the specified    <i><tt class="parameter">sequence</tt></i>.  </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt><span class="term"><i><tt class="parameter">imap_stream</tt></i></span><dd><p class="para">An IMAP stream returned by <a href="function.imap-open.html" class="function">imap_open()</a>.</p></dd></dt>    <dt>     <span class="term"><i><tt class="parameter">sequence</tt></i></span>     <dd>      <p class="para">       A sequence of message numbers. You can enumerate desired messages       with the <i>X,Y</i> syntax, or retrieve all messages        within an interval with the <i>X:Y</i> syntax      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">flag</tt></i></span>     <dd>      <p class="para">       The flags which you can set are <i>\\Seen</i>,        <i>\\Answered</i>, <i>\\Flagged</i>,       <i>\\Deleted</i>, and <i>\\Draft</i> as       defined by <a href="http://www.faqs.org/rfcs/rfc2060" class="link external">&raquo; RFC2060</a>.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">options</tt></i></span>     <dd>      <p class="para">       A bit mask that may contain the single option:       <ul class="itemizedlist">        <li class="listitem">         <span class="simpara">          <b><tt>ST_UID</tt></b> - The sequence argument contains UIDs          instead of sequence numbers         </span>        </li>       </ul>      </p>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   Returns <b><tt>TRUE</tt></b> on success or <b><tt>FALSE</tt></b> on failure.  </p> </div> <div class="refsect1 examples">  <h3 class="title">Examples</h3>  <p class="para">   <div class="example">    <p><b>Example #1 <b>imap_setflag_full()</b> example</b></p>    <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$mbox&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imap_open</span><span style="color: #007700">(</span><span style="color: #DD0000">"{imap.example.org:143}"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"username"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"password"</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;die(</span><span style="color: #DD0000">"can't&nbsp;connect:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">imap_last_error</span><span style="color: #007700">());<br /><br /></span><span style="color: #0000BB">$status&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imap_setflag_full</span><span style="color: #007700">(</span><span style="color: #0000BB">$mbox</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"2,5"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"\\Seen&nbsp;\\Flagged"</span><span style="color: #007700">);<br /><br />echo&nbsp;</span><span style="color: #0000BB">gettype</span><span style="color: #007700">(</span><span style="color: #0000BB">$status</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #0000BB">$status&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">imap_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$mbox</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>    </div>   </div>  </p> </div> <div class="refsect1 seealso">  <h3 class="title">See Also</h3>  <p class="para">   <ul class="simplelist">    <li class="member"><a href="function.imap-clearflag-full.html" class="function" rel="rdfs-seeAlso">imap_clearflag_full()</a></li>   </ul>  </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.imap-setacl.html">imap_setacl</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.imap-sort.html">imap_sort</a></div> <div class="up"><a href="ref.imap.html">IMAP Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -