iconv_mime_encode

Diskutiere iconv_mime_encode im PHP Forum im Bereich Programmierung; Composes a MIME header field Composes and returns a string that represents a valid MIMEheader field, which looks like the following:Subject...
  • iconv_mime_encode Beitrag #1
P
PHP
Well-known member
Beiträge
997
Punkte Reaktionen
0
Composes a MIME header field

Composes and returns a string that represents a valid MIMEheader field, which looks like the following:Subject: =?ISO-8859-1?Q?Pr=FCfung_f=FCr?= Entwerfen von einer MIME kopfzeileIn the above example, "Subject" is the field name and the portion thatbegins with "=?ISO-8859-1?..." is the field value.

Rückgabewert:

The field value.

Beispiel:

PHP:
$preferences = array(
    "input-charset" => "ISO-8859-1",
    "output-charset" => "UTF-8",
    "line-length" => 76,
    "line-break-chars" => "\n"
);
$preferences["scheme"] = "Q";
// This yields "Subject: =?UTF-8?Q?Pr=C3=BCfung_Pr=C3=BCfung?="
echo iconv_mime_encode("Subject", "Prüfung Prüfung", $preferences);

$preferences["scheme"] = "B";
// This yields "Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?="
echo iconv_mime_encode("Subject", "Prüfung Prüfung", $preferences);
 
Thema:

iconv_mime_encode

Oben Unten