PHP 4.0 Bug #6481: Gzcompress
| From: | wico at cnh dot nl | Date: | Fri, 01 Sep 2000 15:07:03 +0000 |
| Subject: | PHP 4.0 Bug #6481: Gzcompress | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-31579@lists.php.net to get a copy of this message | ||
From: wico@cnh.nl
Operating system: linux
PHP version: 4.0 Latest CVS (01/09/2000)
PHP Bug Type: Misbehaving function
Bug description: Gzcompress
Hiya
I want to compress webpages for clients that support it
$data is a whole html page
but:
This works:
function Compress ($data) {
$fp = fopen("/tmp/tempje", "w");
fputs($fp, $data);
fclose($fp);
$data2 =
cat /tmp/tempje |/usr/bin/gzip -f; */
Header("Content-Type: text/html");
Header("Content-Encoding: gzip");
echo($data2);
}
this doesn't:
function Compress ($data) {
$data = gzcompress($data);
Header("Content-Type: text/html");
Header("Content-Encoding: gzip");
echo($data2);
}
Anyone can explain this?
Greetz,
Wico