summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpabs <pabs@pablotron.org>2009-05-30 06:01:49 -0400
committerpabs <pabs@pablotron.org>2009-05-30 06:01:49 -0400
commit575913891355e14a5ac294ad71576bc35f62d73b (patch)
tree2cbd9ebff5a8d545b18d0a27a934d43bfb6217fc
parent7839baa92b69874eddc5b296b1be3a181d910160 (diff)
downloadzipstream-php-575913891355e14a5ac294ad71576bc35f62d73b.tar.bz2
zipstream-php-575913891355e14a5ac294ad71576bc35f62d73b.zip
update README
-rw-r--r--README7
1 files changed, 5 insertions, 2 deletions
diff --git a/README b/README
index 2ae8b27..c325afd 100644
--- a/README
+++ b/README
@@ -14,8 +14,11 @@ simple example:
# create a new zipstream object
$zip = new ZipStream('example.zip');
- # add a file named 'image.jpg'
- $zip->add_file('image.jpg', file_get_contents('image.jpg'));
+ # create a file named 'hello.txt'
+ $zip->add_file('some_image.jpg', 'This is the contents of hello.txt');
+
+ # add a file named 'image.jpg' from a local file 'path/to/image.jpg'
+ $zip->add_file_from_path('some_image.jpg', 'path/to/image.jpg');
# finish the zip stream
$zip->finish();