For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > September 2006 > cvs: phpdoc /en/reference/rar/functions rar-extract.xml









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: phpdoc /en/reference/rar/functions rar-extract.xml
Antony Dovgal

2006-09-17, 6:57 pm

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/phpdo...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>
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com