aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();