aboutsummaryrefslogtreecommitdiff
path: root/test/index.php
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2018-09-03 09:53:44 -0400
committerPaul Duncan <pabs@pablotron.org>2018-09-03 09:53:44 -0400
commit7134bcf24c9e6a1b4c35f7c9ed5f3326e3be9e40 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /test/index.php
parent3a519a212a64a04f70fb7f3a8c61505d2dd35b66 (diff)
downloadzipstream-php-7134bcf24c9e6a1b4c35f7c9ed5f3326e3be9e40.tar.bz2
zipstream-php-7134bcf24c9e6a1b4c35f7c9ed5f3326e3be9e40.zip
remove old files
Diffstat (limited to 'test/index.php')
-rw-r--r--test/index.php52
1 files changed, 0 insertions, 52 deletions
diff --git a/test/index.php b/test/index.php
deleted file mode 100644
index ec89f76..0000000
--- a/test/index.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-# load zipstream class
-require '../zipstream.php';
-
-# get path to current file
-$pwd = dirname(__FILE__);
-
-# add some random files
-$files = array(
- '../extras/zip-appnote-6.3.1-20070411.txt',
- '../zipstream.php',
-);
-
-# create new zip stream object
-$zip = new ZipStream('test.zip', array(
- 'comment' => 'this is a zip file comment. hello?'
-));
-
-# common file options
-$file_opt = array(
- # file creation time (2 hours ago)
- 'time' => time() - 2 * 3600,
-
- # file comment
- 'comment' => 'this is a file comment. hi!',
-);
-
-# add files under folder 'asdf'
-foreach ($files as $file) {
- # build absolute path and get file data
- $path = ($file[0] == '/') ? $file : "$pwd/$file";
- $data = file_get_contents($path);
-
- # add file to archive
- $zip->add_file('asdf/' . basename($file), $data, $file_opt);
-}
-
-# add same files again wihtout a folder
-foreach ($files as $file) {
- # build absolute path and get file data
- $path = ($file[0] == '/') ? $file : "$pwd/$file";
- $data = file_get_contents($path);
-
- # add file to archive
- $zip->add_file(basename($file), $data, $file_opt);
-}
-
-# finish archive
-$zip->finish();
-
-?>