Re: Binary data 65 kb have then as file: 536 KB ??? fwrite ..
| From: | Marek Kilimajer | Date: | Fri, 27 Jun 2003 11:03:13 +0000 |
| Subject: | Re: Binary data 65 kb have then as file: 536 KB ??? fwrite .. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-153092@lists.php.net to get a copy of this message | ||
1. Check if the table column is large enough to store the image
2. fflush($FILEID); just before fclosing it.
Gerhard Knapp wrote:
hi, perhaps someone can help me ...
i store jpgs in a database, then i read them out
and write them to a tempfile, the sizeinformation says,
the binary blob = 65.535 bytes, but the jpg file has then
768.000 bytes, horrable do dl ...
i expect that i read 65 kb and write 65 kb, thats all ...
................
$TEMPFILE = tempnam("./","TMP");
$TEMPFILE .= ".jpg";
$FILEID = fopen($TEMPFILE,"wb");
$BLOBID = ibase_blob_open($R->GRUND_FOTO);
while ($PIC = ibase_blob_get($BLOBID,10240))
{
fputs($FILEID,$PIC);
}
fclose($FILEID);
ibase_blob_close($BLOBID);
...................
best regards
-Gerhard
B