RE: PDFs are blank in e-mail sent via PHP - SOLVED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[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.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux