(PHP 4, PHP 5, PHP 7, PHP 8)
imap_listscan — Returns the list of mailboxes that matches the given text
$imap
,$reference
,$pattern
,$content
Returns an array containing the names of the mailboxes that have
content
in the text of the mailbox.
This function is similar to imap_listmailbox(),
but it will additionally check for the presence of the string
content
inside the mailbox data.
imap
IMAP\Connection 實(shí)例。
reference
reference
should normally be just the server
specification as described in imap_open()
Passing untrusted data to this parameter is insecure, unless imap.enable_insecure_rsh is disabled.
pattern
指定在郵箱層級的何處開(kāi)始查找。
在組成 pattern
的字符中可使用兩個(gè)特殊字符:
'*
' 和 '%
'。
'*
' 是指返回所有郵箱目錄. 如果將 '*
' 作為
pattern
參數時(shí), 則會(huì )返回整個(gè)郵箱層級結構。
'%
' 是指只返回當前級次。
'%
' 作為 pattern
參數則只會(huì )返回頂層郵箱;
'~/mail/%
' 用于 UW_IMAPD
則會(huì )返回名為 ~/mail 的目錄, 但不包含其子目錄。
content
The searched string
Returns an array containing the names of the mailboxes that have
content
in the text of the mailbox, 或者在失敗時(shí)返回 false
.
版本 | 說(shuō)明 |
---|---|
8.1.0 |
現在 imap 參數接受 IMAP\Connection
實(shí)例,之前接受 資源(resource)。
|