ת��������

��ͬ string.* ��������convert.* �����������þͺ�������һ����ת���������� PHP 5.0.0 ��ӵġ�����ָ���������ĸ�����Ϣ����ο��ú������ֲ�ҳ��

convert.base64-encode�� convert.base64-decodeʹ����������������ͬ�ڷֱ��� base64_encode()�� base64_decode()�����������е������ݡ� convert.base64-encode֧����һ��������������IJ�������������� line-length��base64 ��������� line-length���ַ�Ϊ ���ȶ��سɿ顣��������� line-break-chars��ÿ�齫���ø������ַ���������Щ������Ч������ base64_encode()�ټ��� chunk_split()��ͬ��

Example #1 convert.base64-encode & convert.base64-decode

<?php
$fp 
= fopen('php://output', 'w');
stream_filter_append($fp, 'convert.base64-encode');
fwrite($fp, "This is a test.\n");
fclose($fp);
/* Outputs:  VGhpcyBpcyBhIHRlc3QuCg==  */

$param = array('line-length' => 8, 'line-break-chars' => "\r\n");
$fp = fopen('php://output', 'w');
stream_filter_append($fp, 'convert.base64-encode', STREAM_FILTER_WRITE, $param);
fwrite($fp, "This is a test.\n");
fclose($fp);
/* Outputs:  VGhpcyBp
          :  cyBhIHRl
          :  c3QuCg==  */

$fp = fopen('php://output', 'w');
stream_filter_append($fp, 'convert.base64-decode');
fwrite($fp, "VGhpcyBpcyBhIHRlc3QuCg==");
fclose($fp);
/* Outputs:  This is a test.  */
?>

convert.quoted-printable-encode�� convert.quoted-printable-decodeʹ�ô˹������� decode �汾��ͬ���� quoted_printable_decode()�����������е������ݡ�û�к� convert.quoted-printable-encode���Ӧ�ĺ����� convert.quoted-printable-encode֧����һ��������������IJ���������֧�ֺ� convert.base64-encodeһ���ĸ��Ӳ����⣬ convert.quoted-printable-encode��֧�ֲ������� binary�� force-encode-first�� convert.base64-decodeֻ֧�� line-break-chars������Ϊ�ӱ����غ��а����������ʾ��

Example #2 convert.quoted-printable-encode & convert.quoted-printable-decode

<?php
$fp 
= fopen('php://output', 'w');
stream_filter_append($fp, 'convert.quoted-printable-encode');
fwrite($fp, "This is a test.\n");
/* Outputs:  =This is a test.=0A  */
?>