Re: Binary Blob = 65535 byte -> fwrite to a file = 7680000 Byte, why?

From: Date: Thu, 26 Jun 2003 23:48:43 +0000
Subject: Re: Binary Blob = 65535 byte -> fwrite to a file = 7680000 Byte, why?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-153045@lists.php.net to get a copy of this message
thats right, catalin, but .... is it not possible do get a binary blob and write it to file, as it is? ... i cannot believe this ..., with any program language i can do so ... ...it have to be possible to write a blob-buffer byte by byte to a file, damn ... best regards -Gerhard "Catalin Trifu" <catalin@isp-software.de> schrieb im Newsbeitrag news:20030626232052.58188.qmail@pb1.pair.com... > Hi, > > Just a suggestion. It might be better and simpler > to store the imges as files on disk and not as BLOBs > and store in the DB only the reference to their path. > I think this performs better. > > Cheers, > Catalin > > "Gerhard Knapp" <prometheus@aon.at> wrote in message > news:20030626195829.82353.qmail@pb1.pair.com... > > 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 ... > > > > ................ > > $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 > > > > > >

« previous php.general (#153045) next »