RE: [PHP] PDFs are blank in e-mail sent via PHP - SOLVED
| From: | Jay Blanchard | Date: | Thu, 28 Jul 2005 14:25:31 +0000 |
| Subject: | RE: [PHP] PDFs are blank in e-mail sent via PHP - SOLVED | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-219511@lists.php.net to get a copy of this message | ||
[snip]
Using the following code;
$fileRead = fopen($fileAtt,'rb');
$fileData = fread($fileRead,filesize($fileAtt));
fclose($fileRead);
[/snip]
PHP had been recompiled on the production server and in the course of
doing so magic quotes was set to 'On'. This will escape certain
characters during the fread, which is a Bad Thing [TM]. Inserted the
following line above the fopen line...
set_magic_quotes_runtime(0);
Which, like magic /some pun intended/, cleared up the problem.
I may be old, but I sure can trouble-shoot.