(PECL mailparse >= 0.9.0)
mailparse_stream_encode — 從來源檔案指標串流資料,套用編碼並寫入 destfp
從來源檔案指標串流資料,套用 encoding
編碼並寫入目標檔案指標。
範例 #1 mailparse_stream_encode() 範例
<?php
// email.eml 內容:hello, this is some text=hello.
$fp = fopen('email.eml', 'r');
$dest = tmpfile();
mailparse_stream_encode($fp, $dest, "quoted-printable");
rewind($dest);
// 顯示新的檔案內容
fpassthru($dest);
?>
上述範例將輸出
hello, this is some text=3Dhello.