diff options
author | admin <devnull@localhost> | 2006-10-01 21:26:15 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-10-01 21:26:15 +0200 |
commit | 73fbde21123ed1c34517b4e24fc36a1ed47a96b0 (patch) | |
tree | abe4afff6901e033a7b3380b413f276fb17554c4 /user_guide/libraries/zip.html | |
parent | 33dd95d7cb8ac2f6b8da447966a750bdb064fc48 (diff) |
Diffstat (limited to 'user_guide/libraries/zip.html')
-rw-r--r-- | user_guide/libraries/zip.html | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/user_guide/libraries/zip.html b/user_guide/libraries/zip.html index 3c3e44b83..1994e3462 100644 --- a/user_guide/libraries/zip.html +++ b/user_guide/libraries/zip.html @@ -71,7 +71,7 @@ Zip Encoding Class <code>$this->load->library('zip');</code>
<p>Once loaded, the Parser library object will be available using: <dfn>$this->zip</dfn></p>
-<h2>Usage Example</h2>
+<h2>Usage Examples</h2>
<p>Simple example demonstrating how to compress a file and download it to your desktop.</p>
@@ -104,9 +104,19 @@ $this->zip->add_data($name, $data);<br /> $this->zip->download('my_backup.zip'); // Parameter contains name of the downloaded file
</code>
+<p>You can also pass your file data as an array:</p>
-
+<code>
+$data = array(<br />
+ 'myfolder/mydata1.txt' => 'A Data String!',<br />
+ 'myfolder/mydata2.txt' => 'Another Data String!'<br />
+ );<br />
+<br />
+$this->zip->add_data($data);<br />
+<br />
+$this->zip->download('my_backup.zip'); // Parameter contains name of the downloaded file
+</code>
|