From eca42d118e439dc0f3796650e8a68992d513f8ee Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Mon, 3 Sep 2018 07:12:40 -0400 Subject: add examples/{10,11,12,13}*php, add examples/*zip to .gitignore --- examples/11-add_file_comment.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 examples/11-add_file_comment.php (limited to 'examples/11-add_file_comment.php') diff --git a/examples/11-add_file_comment.php b/examples/11-add_file_comment.php new file mode 100644 index 0000000..84bd71b --- /dev/null +++ b/examples/11-add_file_comment.php @@ -0,0 +1,23 @@ + new FileWriter(), +]; + +# create archive in this directory with a comment +ZipStream::send($zip_path, function(ZipStream &$zip) { + # add a file "hello.txt" to output with a comment + $zip->add_file('hello.txt', 'hello world!', [ + 'comment' => 'hello this is a comment!', + ]); +}, $zip_args); -- cgit v1.2.3