PHP convert_uuencode() 函數
PHP convert_uuencode() 函數是預定義的字符串函數,用于使用 uuencode 算法對字符串進行編碼。愛掏網 - it200.com它返回編碼后的數據。愛掏網 - it200.com
注意:使用 uuencode 函數后,編碼數據的大小比原始數據大35%。愛掏網 - it200.com
convert_uuencode(string)
Parameter | Description | Required/Optional |
---|---|---|
String | The string to uuencode | Required |
示例1
<?php
// encode the string
str2 = "I love My India";
echo "Your Decoded string is :".str2;
uuencodeString ="<br>"."By using 'convert_uuencode()' function your encoded string is : ". convert_uuencode(str2);
echo $uuencodeString . "<br>";
?>
輸出:
Your Decoded string is :I love My India
By using 'convert_uuencode()' function your encoded string is : /22!L;W9E(UY(EN9&EA `
示例2
<?php
// encode the string
str2 = "I love PHP!";
echo "Your Decoded string is :".str2;
uuencodeString ="<br>"."By using 'convert_uuencode()' function your encoded string is : ". convert_uuencode(str2);
echo uuencodeString . "<br>"."<br>";
// Decode the stringstr1 =("+22!L;W9E(%!(4\"`\n`");
echo "Your Encoded string is :".str1;
EncodedString ="<br>"."By using 'convert_uudecode()' function your encoded string is : ". convert_uudecode(str1);
echo $EncodedString . "<br>"."<br>";
?>
輸出:
Your Decoded string is :I love PHP!
By using 'convert_uuencode()' function your encoded string is : +22!L;W9E(%!(4"` `
Your Encoded string is :+22!L;W9E(%!(4"` `
By using 'convert_uudecode()' function your encoded string is : I love PHP!
聲明:所有內容來自互聯網搜索結果,不保證100%準確性,僅供參考。如若本站內容侵犯了原著者的合法權益,可聯系我們進行處理。