diff options
author | pabs <pabs@pablotron.org> | 2009-05-30 06:01:49 -0400 |
---|---|---|
committer | pabs <pabs@pablotron.org> | 2009-05-30 06:01:49 -0400 |
commit | 575913891355e14a5ac294ad71576bc35f62d73b (patch) | |
tree | 2cbd9ebff5a8d545b18d0a27a934d43bfb6217fc | |
parent | 7839baa92b69874eddc5b296b1be3a181d910160 (diff) | |
download | zipstream-php-575913891355e14a5ac294ad71576bc35f62d73b.tar.bz2 zipstream-php-575913891355e14a5ac294ad71576bc35f62d73b.zip |
update README
-rw-r--r-- | README | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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(); |