Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: imap_list - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

imap_listmailbox" width="11" height="7"/> <imap_last_error
Last updated: Mon, 05 Feb 2007

view this page in

imap_list

(PHP 4, PHP 5)

imap_list — メールボックスのリストを読み込む

説明

array imap_list ( resource imap_stream, string ref, string pattern )

メールボックスのリストを読み込みます。

パラメータ

imap_stream

imap_open() が返す IMAP ストリーム。

ref

通常、refimap_open() で述べられているサーバ定義です。

pattern

検索を開始するメールボックスの階層を指定します。

pattern の中で使用できる特別な文字として '*' および '%' があります。'*' は、全てのメールボックスを意味します。 pattern に '*' を指定した場合、メールボックス 階層全体のリストが得られます。'%' は現在のレベルのみを意味します。 '%' を pattern に指定した場合、 トップレベルのメールボックスのみが返されます。UW_IMAPD を使用した場合、 '~/mail/%' は ~/mail ディレクトリの全てのメールボックスを返しますが、 そのディレクトリのサブフォルダーにあるメールボックスは返しません。

返り値

メールボックスの名前を含む配列を返します。

例 958. imap_list() の例

<?php
$mbox
= imap_open("{imap.example.org}", "username", "password", OP_HALFOPEN)
     or die(
"接続できません: " . imap_last_error());

$list = imap_list($mbox, "{imap.example.org}", "*");
if (
is_array($list)) {
   foreach (
$list as $val) {
       echo
imap_utf7_decode($val) . "\n";
   }
} else {
   echo
"imap_list が失敗しました: " . imap_last_error() . "\n";
}

imap_close($mbox);
?>

参考

imap_getmailboxes()
imap_lsub()



add a note add a note User Contributed Notes
imap_list
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites