note 44350 added to function.file

From: Date: Wed, 21 Jul 2004 17:27:53 +0000
Subject: note 44350 added to function.file
Groups: php.notes 
Request: Send a blank email to php-notes+get-73836@lists.php.net to get a copy of this message
i tried for quite sometime to get my pdf to attach right some of you may want to try reading it as binary first then base 64 it. //this did not work for me with a pdf file it came in garbled $data = chunk_split(base64_encode(implode("", file($filelocation)))); //but tis seemed to make it work correctly $data = fread($file,filesize($filelocation)); fclose($file); $data = chunk_split(base64_encode($data)); ---- Manual Page -- http://www.php.net/manual/en/function.file.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+44350 Delete -- http://master.php.net/manage/user-notes.php?action=delete+44350&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+44350&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#73836) next »