Re: saving blobs to file system

From: Date: Mon, 15 Nov 2004 20:57:51 +0000
Subject: Re: saving blobs to file system
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-202093@lists.php.net to get a copy of this message
On Mon, 15 Nov 2004 21:12:25 +0100, Merlin <news.groups@web.de> 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/

« previous php.general (#202093) next »