IMAP, POP3 및 NNTP imap_fetchstructure

(PHP 4, PHP 5, PHP 7, PHP 8)

imap_fetchstructure — 특정 메시지의 구조 읽기


설명

imap_fetchstructure(IMAP\Connection $imap, int $message_num, int $flags = 0): stdClass|false

주어진 메시지에 대한 모든 구조화된 정보를 가져옵니다.


매개변수

imap
IMAP\Connection 인스턴스입니다.
message_num
메시지 번호
flags
이 선택적 매개변수에는 message_num 인수를 UID로 처리하도록 함수에 지시하는 FT_UID라는 단일 옵션만 있습니다.

반환 값

아래 표에 나열된 속성을 가진 개체를 반환하거나 실패 시 false를 반환합니다.

imap_fetchstructure()에 대해 반환된 객체

type Primary body type
encoding Body transfer encoding
ifsubtype true if there is a subtype string
subtype MIME subtype
ifdescription true if there is a description string
description Content description string
ifid true if there is an identification string
id Identification string
lines Number of lines
bytes Number of bytes
ifdisposition true if there is a disposition string
disposition Disposition string
ifdparameters true if the dparameters array exists
dparameters An array of objects where each object has an "attribute" and a "value" property corresponding to the parameters on the Content-disposition MIME header.
ifparameters true if the parameters array exists
parameters An array of objects where each object has an "attribute" and a "value" property.
parts An array of objects identical in structure to the top-level object, each of which corresponds to a MIME body part.

기본 바디 유형(사용된 라이브러리에 따라 값이 다를 수 있으며 상수 사용 권장)

ValueTypeConstant
0textTYPETEXT
1multipartTYPEMULTIPART
2messageTYPEMESSAGE
3applicationTYPEAPPLICATION
4audioTYPEAUDIO
5imageTYPEIMAGE
6videoTYPEVIDEO
7modelTYPEMODEL
8otherTYPEOTHER

인코딩 전송(사용된 라이브러리에 따라 값이 다를 수 있으며 상수 사용 권장)

ValueTypeConstant
07bitENC7BIT
18bitENC8BIT
2BinaryENCBINARY
3Base64ENCBASE64
4Quoted-PrintableENCQUOTEDPRINTABLE
5otherENCOTHER

변경 로그

버전 설명
8.1.0 imap 매개변수는 이제 IMAP\Connection 인스턴스를 필요로 합니다. 이전에는 리소스가 필요했습니다.

기타