note 32021 added to function.base64-encode

From: Date: Tue, 13 May 2003 19:34:10 +0000
Subject: note 32021 added to function.base64-encode
Groups: php.notes 
Request: Send a blank email to php-notes+get-47916@lists.php.net to get a copy of this message
If you want attach a binary file into mail, pay attention to use mode with "B" flag into fopen function (This is useful only on systems which differentiate between binary and text files, i.e. Windows) Include the 'b' flag in order to make your scripts more portable. $handle = fopen($source_file,'rb'); $file_content = fread($handle,filesize($source_file)); fclose($handle); $encoded = chunk_split(base64_encode($file_content)); -- http://www.php.net/manual/en/function.base64-encode.php http://master.php.net/manage/user-notes.php?action=edit+32021 http://master.php.net/manage/user-notes.php?action=delete+32021 http://master.php.net/manage/user-notes.php?action=reject+32021

« previous php.notes (#47916) next »