Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : String Functions : convert_uuencode

convert_uuencode

Uuencode a string (PHP 5)
string convert_uuencode ( string data )

Example 2400. convert_uuencode() example

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

echo
convert_uuencode($some_string);
?>

Code Examples / Notes » convert_uuencode

nmmm

uuencode is recognisable as email attachment in Ms Outlook, but in Outlook Express (at least in older versions) - is not.
This is shell script, but it may give you an idea how you can send attachments using uuencode:
cat file.bin | uuencode file.bin | mail someone@domain.com -s "file.bin"
uuencode mail attachments from other point of wiev are deprecated. However I use such technic for years now and it work well.


aidan

This functionality is now implemented in the PEAR package PHP_Compat.
More information about using this function without upgrading your version of PHP can be found on the below link:
http://pear.php.net/package/PHP_Compat


craig

This function can be useful if you wish to store files in a MySQL database, it will save any problems with obscure binary data breaking the queries.
just remember to convery-uudecode before you try to use the data again.
(A common example of something that uses this system, would be email attachments)


tmaschler

Note to the tip of Craig at frostycoolslug dot com:
If you are using fulltext functionality on columns with uuencoded texts, collations will not work. You might prefer to pass the text escaped to the database engine.


Change Language


Follow Navioo On Twitter
addcslashes
addslashes
bin2hex
chop
chr
chunk_split
convert_cyr_string
convert_uudecode
convert_uuencode
count_chars
crc32
crypt
echo
explode
fprintf
get_html_translation_table
hebrev
hebrevc
html_entity_decode
htmlentities
htmlspecialchars_decode
htmlspecialchars
implode
join
levenshtein
localeconv
ltrim
md5_file
md5
metaphone
money_format
nl_langinfo
nl2br
number_format
ord
parse_str
print
printf
quoted_printable_decode
quotemeta
rtrim
setlocale
sha1_file
sha1
similar_text
soundex
sprintf
sscanf
str_getcsv
str_ireplace
str_pad
str_repeat
str_replace
str_rot13
str_shuffle
str_split
str_word_count
strcasecmp
strchr
strcmp
strcoll
strcspn
strip_tags
stripcslashes
stripos
stripslashes
stristr
strlen
strnatcasecmp
strnatcmp
strncasecmp
strncmp
strpbrk
strpos
strrchr
strrev
strripos
strrpos
strspn
strstr
strtok
strtolower
strtoupper
strtr
substr_compare
substr_count
substr_replace
substr
trim
ucfirst
ucwords
vfprintf
vprintf
vsprintf
wordwrap
eXTReMe Tracker