tony2001 Sun Sep 17 21:24:21 2006 UTC
Modified files:
/phpdoc/en/reference/rar/functions rar-extract.xml
Log:
include example from user note to the docs
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/rar/functions/rar-extract.xml?r1=1.1&r2=1.2&diff_format=u
Index: phpdoc/en/reference/rar/functions/rar-extract.xml
diff -u phpdoc/en/reference/rar/functions/rar-extract.xml:1.1
phpdoc/en/reference/rar/functions/rar-extract.xml:1.2
--- phpdoc/en/reference/rar/functions/rar-extract.xml:1.1 Tue Sep 28
12:23:27 2004
+++ phpdoc/en/reference/rar/functions/rar-extract.xml Sun Sep 17 21:24:21 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<refentry id="function.Rar-extract">
<refnamediv>
<refname>Rar::extract</refname>
@@ -37,6 +37,29 @@
]]>
</programlisting>
</example>
+ <example>
+ <title>How to extract all files in archive: </title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+/* example by Erik Jenssen aka erix */
+
+$filename = "foobar.rar";
+$filepath = "/home/foo/bar/";
+
+$rar_file = rar_open($filepath.$filename);
+$list = rar_list($rar_file);
+foreach($list as $file) {
+ $entry = rar_entry_get($rar_file, $file);
+ $entry->extract("."); // extract to the current dir
+}
+rar_close($rar_file);
+
+?>
+]]>
+ </programlisting>
+ </example>
<para>
&return.success;
</para>