I've been browsing the GZIP functions on php.net and I don't see any mention of extracting files from a gz archive on a web server. What function should I be looking for?
I've been browsing the GZIP functions on php.net and I don't see any mention of extracting files from a gz archive on a web server. What function should I be looking for?
What am I doing wrong with this...?
Code:$filename = "test.gz"; $zd = gzopen($filename, "r"); if (!$zd) {echo 'OPEN: did not work?<br />';} else {echo 'OPEN: worked?<br />';} $contents = gzread($zd, 100000); if (!$contents) {echo 'READ: did not work?';} else {echo 'READ: worked?';} gzclose($zd);
gzip only does compression of a single file. Generally multiple files are combined into a single tar archive first. You might find this link useful.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks