PHP convert_uuencode() Function
Example
Encode the string:
<?php $str = "Hello world!"; echo convert_uuencode($str); ?>
Definition and Usage
convert_uuencode() function uses the uuencode algorithm to encode strings.
Note:This function encodes all strings (including binary) into printable characters to ensure the safety of data storage and network transmission. Remember to use convert_uudecode() Function.
Note:The uuencoded data is about 35% larger than the original data.
Syntax
convert_uuencode(string)
Parameter | Description |
---|---|
string | Required. Specifies the string to be uuencoded. |
Technical Details
Return Value: | Returns uuencoded encoded data. |
PHP Version: | 5+ |
More Examples
Example 1
Encode a string and then decode it:
<?php $str = "Shanghai"; // Encode the string $encodeString = convert_uuencode($str); echo $encodeString . "<br>"; // Decode the string $decodeString = convert_uudecode($encodeString); echo $decodeString; ?>