didou           Sat Aug 16 12:05:55 2003 EDT

  Modified files:              
    /phpdoc/en/reference/bzip2/functions        bzopen.xml 
  Log:
  less confusing example
  
Index: phpdoc/en/reference/bzip2/functions/bzopen.xml
diff -u phpdoc/en/reference/bzip2/functions/bzopen.xml:1.2 
phpdoc/en/reference/bzip2/functions/bzopen.xml:1.3
--- phpdoc/en/reference/bzip2/functions/bzopen.xml:1.2  Wed Apr 17 02:36:36 2002
+++ phpdoc/en/reference/bzip2/functions/bzopen.xml      Sat Aug 16 12:05:54 2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
 <!-- splitted from ./en/functions/bzip2.xml, last change in rev 1.1 -->
   <refentry id="function.bzopen">
    <refnamediv>
@@ -30,7 +30,11 @@
 <![CDATA[
 <?php
 $bz = bzopen("/tmp/foo.bz2", "r");
-$decompressed_file = bzread($bz, filesize("/tmp/foo.bz2"));
+
+$decompressed_file = '';
+while (!feof($bz)) {
+    $decompressed_file .= bzread($bz, 4096);
+}
 bzclose($bz);
 
 print( "The contents of /tmp/foo.bz2 are: " );



-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to