Re: saving blobs to file system

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

 



On Mon, 15 Nov 2004 21:12:25 +0100, Merlin <news.groups@xxxxxx> wrote:
> Hi there,
> 
> I do have images inside a blob field which I would like to save to the hard
> drive. Now I cant find a fuction in saving the file. Usually I retrieve the data
> out of the blob, and output a header before echoing the data.
> 
> Basicly I do have the image now saved inside a string and I would need to write
> that to a file. At least I guess this could work.
> 
> Has anybody an idea how to do that, I am kind of lost here.

Write the data to a file with a proper filename.  I'd use fopen(),
fwrite(), and fclose, or file_put_contents() if your PHP is new
enough.  You won't need to output any headers, they only matter when
you render the file in an application such as a web client.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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