(PHP 5, PHP 7, PHP 8)
convert_uuencode — 使用 uuencode 編碼一個(gè)字符串
$data
): stringconvert_uuencode() 使用 uuencode 算法對(duì)一個(gè)字符串進(jìn)行編碼。
uuencode 算法會(huì)將所有(含二進(jìn)制數(shù)據(jù))字符串轉(zhuǎn)化為可輸出的字符, 并且可以被安全的應(yīng)用于網(wǎng)絡(luò)傳輸。使用 uuencode 編碼后的數(shù)據(jù) 將會(huì)比源數(shù)據(jù)大35%左右
data
需要被編碼的數(shù)據(jù)。
返回 uuencode 編碼后的數(shù)據(jù) 或者在失敗時(shí)返回 false
。
示例 #1 convert_uuencode() 例子
<?php
$some_string = "test\ntext text\r\n";
echo convert_uuencode($some_string);
?>