convert_uuencode
Use uuencode to encode a string
convert_uuencode()
function uses the uuencode algorithm to encode strings.
Note: This function encodes all strings (including binary) into printable characters to ensure the security of their database storage and network transmission data. Remember, before reusing the data, use convert_uudecode()
function.
Note: The uuencoded data is approximately 35% larger than the original data.
Encoded string:
<?php $str = "Hello world!" ; echo convert_uuencode ( $str ) ; ?>
Try it yourself
Encode the string and decode it:
<?php $str = "Shanghai" ; // Encode strings $encodeString = convert_uuencode ( $str ) ; echo $encodeString . "<br>" ; // Decode the string $decodeString = convert_uudecode ( $encodeString ) ; echo $decodeString ; ?>
Try it yourself
convert_uuencode ( string )
parameter | describe |
---|---|
string | Required. Specifies the string to be encoded. |