999000333
Programmer
- Nov 20, 2006
- 39
Hello I have the following problem. I create pdf files dinamically and I insert into my database mysql using the following code:
$file = "file.pdf";
$contents = file_get_contents($file);
mysql_query("Insert into table set pdfcontents = '".mysql_escape_string($contents)."'");
When I open the file I see this .. ÛfÏŽ‹3Å‹Ž}`†ýç¼o> endobj 6 0 obj <> stream xœ}SÁŽ›0½ç+Þ©ÛÖ Øã6m•^º]EU¯8t*c
Can anyone tell me how to fix this problem ? is there a particular way of retrive the pdf file stored in my database and see it properly?
One thing I have to say is that the pdf I create they have the same name but different content.
Thank you
$file = "file.pdf";
$contents = file_get_contents($file);
mysql_query("Insert into table set pdfcontents = '".mysql_escape_string($contents)."'");
When I open the file I see this .. ÛfÏŽ‹3Å‹Ž}`†ýç¼o> endobj 6 0 obj <> stream xœ}SÁŽ›0½ç+Þ©ÛÖ Øã6m•^º]EU¯8t*c
Can anyone tell me how to fix this problem ? is there a particular way of retrive the pdf file stored in my database and see it properly?
One thing I have to say is that the pdf I create they have the same name but different content.
Thank you