From 00488262cff699007da20a56e008fb079f25acd3 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 2 Sep 2018 13:40:44 -0400 Subject: add StreamWriter --- examples/07-stream_writer.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 examples/07-stream_writer.php (limited to 'examples/07-stream_writer.php') diff --git a/examples/07-stream_writer.php b/examples/07-stream_writer.php new file mode 100644 index 0000000..d94e7ac --- /dev/null +++ b/examples/07-stream_writer.php @@ -0,0 +1,30 @@ + new StreamWriter($out_stream), +]); + +# add a file named "hello.txt" to output archive, containing +# the string "hello world!" +$zip->add_file('hello.txt', 'hello world!'); + +# finalize archive +$zip->close(); + +# close output stream +fclose($out_stream); -- cgit v1.2.3