From 73fbde21123ed1c34517b4e24fc36a1ed47a96b0 Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 1 Oct 2006 19:26:15 +0000 Subject: --- user_guide/libraries/zip.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'user_guide/libraries') 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 $this->load->library('zip');

Once loaded, the Parser library object will be available using: $this->zip

-

Usage Example

+

Usage Examples

Simple example demonstrating how to compress a file and download it to your desktop.

@@ -104,9 +104,19 @@ $this->zip->add_data($name, $data);
$this->zip->download('my_backup.zip'); // Parameter contains name of the downloaded file +

You can also pass your file data as an array:

- + +$data = array(
+                'myfolder/mydata1.txt' => 'A Data String!',
+                'myfolder/mydata2.txt' => 'Another Data String!'
+            );
+
+$this->zip->add_data($data);
+
+$this->zip->download('my_backup.zip'); // Parameter contains name of the downloaded file +
-- cgit v1.2.3-24-g4f1b