note 40232 deleted from function.mail by aidan

From: Date: Sun, 08 Aug 2004 15:36:56 +0000
Subject: note 40232 deleted from function.mail by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-74239@lists.php.net to get a copy of this message
Note Submitter: hnjunk@stltntt.org ---- In response to: > Hubert Ley <hley at anl dot gov> > 30-Jan-2004 11:08 > The previous two examples for attaching files to a message > have a significant flaw that shows up when attaching > binary files (e.g. zipped or gzipped files). ... > versions seem to have a function "file_get_contents" that > seems to do the right thing, but I am unable to verify this. I use <?php $data = chunk_split(base64_encode(implode("", file($file)))); ?> and it works fine for text, binary, and zipped files. file_get_contents(), on the other hand, seems to create faulty stream.

« previous php.notes (#74239) next »