RE: [PHP] Reading binary file data into variable
| From: | Jay Blanchard | Date: | Wed, 15 Jun 2005 19:11:03 +0000 |
| Subject: | RE: [PHP] Reading binary file data into variable | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-217026@lists.php.net to get a copy of this message | ||
[snip]
Did you try using fopen's binary safe read? Something like :
$binary_data = "";
$fp = fopen ( $file, "rb" );
while ( ! feof ( $fp ) ) {
$binary_data .= fgets ( $fp );
}
fclose ( $fp );
Don't know if it will work (or if you already tried it)...more like a
guess.
[/snip]
Yes, tried that. It throws an error when trying to open the ZIP file
"missing 1 byte in Zip File..."
[snip]
PS don't trust that Nichel guy, he's really a HTML monkey using Front
Page.
[/snip]
But I think I can make him buy us all a beer one day. BTW, even though
this is Texas I found some Dixie the other day....mmmmmmmmmmmmmm
delicious Dixie Beer.