convert_uuencode

(PHP 5, PHP 7, PHP 8)

convert_uuencode使用 uuencode 編碼一個(gè)字符串

說明

convert_uuencode(string $data): string

convert_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%左右

參數(shù)

data

需要被編碼的數(shù)據(jù)。

返回值

返回 uuencode 編碼后的數(shù)據(jù) 或者在失敗時(shí)返回 false。

范例

示例 #1 convert_uuencode() 例子

<?php
$some_string 
"test\ntext text\r\n";

echo 
convert_uuencode($some_string);
?>

參見