note 18975 deleted from function.gzencode by nlopess
| From: | nlopess@php.net | Date: | Tue, 08 Aug 2006 19:25:37 +0000 |
| Subject: | note 18975 deleted from function.gzencode by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-115684@lists.php.net to get a copy of this message | ||
Note Submitter: g dot benoit at free dot fr
----
function create_gzip_file($src_file, $dest_file)
{
$data = implode("", file($src_file));
$gz_data = gzencode($data);
$fp = fopen($dest_file, "w+");
fwrite($fp, $gz_data);
fclose($fp);
}
create_gzip_file("text.txt", "test.txt.gz");