Re: binary data?

From: Date: Sun, 29 Sep 2002 23:31:42 +0000
Subject: Re: binary data?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-22086@lists.php.net to get a copy of this message
In article <000801c2658b$6ae22420$f7fea8c0@chris>, chris@planetoxygene.com says... > Hi there everyone, > > How can I import binary data - say from a gif file, into a string or array in PHP? I can do > text files/csv etc ..... but using the same method it won't do binary (I'm sure for some > obvious reason). > > Thanks for your help > > Chris fread() is documented as being binary safe - is that what you have tried? This example is in the docs: $filename = "c:\\files\\somepic.gif"; $fd = fopen ($filename, "rb"); $contents = fread ($fd, filesize ($filename)); fclose ($fd); -- David Robley Temporary Kiwi! Quod subigo farinam

« previous php.db (#22086) next »