You should prefer this function to base64_encode(), given you need it for mail encoding. The return value of this function contains <CRLF>after every 76 characters, as required for mail.
Having trouble with reading a file and encodeing it, but the encoding doesnt turn out right?
Before reading the file, use:
set_magic_quotes_runtime(0);
see also:
manual/en/function.fread.php