From c6485275e8ccf50ae6adf6a7f5ed7519e8145406 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 2 Sep 2018 13:25:53 -0400 Subject: refactor FileWriter, add FileWriter example --- examples/06-file_writer.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 examples/06-file_writer.php (limited to 'examples/06-file_writer.php') diff --git a/examples/06-file_writer.php b/examples/06-file_writer.php new file mode 100644 index 0000000..7a98910 --- /dev/null +++ b/examples/06-file_writer.php @@ -0,0 +1,22 @@ + new FileWriter(), +]); + +# 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(); -- cgit v1.2.3