note 27937 deleted from function.gzencode by nlopess
| From: | nlopess@php.net | Date: | Tue, 08 Aug 2006 19:25:32 +0000 |
| Subject: | note 27937 deleted from function.gzencode by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-115683@lists.php.net to get a copy of this message | ||
Note Submitter: sjab-x at bergenbosgroep dot nl
----
If you want a binary proof function use fread instead of implode.
function create_gzip_file($src_file, $dest_file) {
$fd = fopen ($src_file, "r");
$data = fread ($fd, filesize ($src_file));
fclose ($fd);
$gz_data = gzencode($data);
$fp = fopen($dest_file, "w+");
fwrite($fp, $gz_data);
fclose($fp);
}
This works fine for me :)