|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-10-11 09:35 UTC] stas@php.net
[2000-10-11 09:37 UTC] stas@php.net
[2001-01-22 21:32 UTC] jimw@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 12:00:01 2025 UTC |
$gzip = gzcompress($h->inhalt); header("Content-Encoding: gzip"); print($gzip); $fp = fopen("/tmp/file.gz","w"); fputs($fp,$gzip); fclose($fp); does not work, the browser does not display anything, and gzip -d /tmp/file.gz tells me that the file is not a valid gzip file. If I do: $fp = gzopen ("/tmp/file.gz", "w"); gzputs($fp,$h->inhalt); gzclose($fp); and then gzip -d again, everything works. The file generated by gzcompress is about 20 Bytes shorter than the one from gzopen, so I suspect there is probably some problem with NULL-Termination... TIA, Michael