<?php $filename = "/tmp/testfile.bz2"; $str = "This is a test string.\n";
// open file for writing $bz = bzopen($filename, "w"); // write string to file bzwrite($bz, $str); // close file bzclose($bz); // open file for reading $bz = bzopen($filename, "r"); // read 10 characters print bzread($bz, 10); // output until end of the file (or the next 1024 char) and close it. print bzread($bz); bzclose($bz); ?> "Mikey" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > OK, as I said - I have already read this - if you can find where it shows > how to create an *archive* within this compressed file, please let me > know... > > Mikey > > > -----Original Message----- > > From: Dash McElroy [mailto:[EMAIL PROTECTED]] > > Sent: 25 June 2002 23:24 > > To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' > > Subject: RE: [PHP-WIN] Using Bzip2 to create an archive... SECOND > > REQUEST > > > > > > http://www.php.net/manual/en/ref.bzip2.php > > > > In particular, look at bzopen() and bzclose(), as well as bzread(). > > > > -Dash > > > > -----Original Message----- > > From: Mikey [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, June 25, 2002 3:23 PM > > To: [EMAIL PROTECTED] > > Subject: FW: [PHP-WIN] Using Bzip2 to create an archive... SECOND REQUEST > > > > > > > > > > > -----Original Message----- > > > From: Mikey [mailto:[EMAIL PROTECTED]] > > > Sent: 24 June 2002 18:42 > > > To: [EMAIL PROTECTED] > > > Subject: [PHP-WIN] Using Bzip2 to create an archive... > > > > > > > > > Hi there! > > > > > > I was wondering if anyone here had used the bzip functions to create an > > > archive? The documentation shows only how to compress strings, > > yet I want > > > to create an archive similar to the HTML documentation available from > > > php.net > > > > > > TIA, > > > > > > mikey > > > > > > > > > -- > > > PHP Windows Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php