From 88ec761548b66f58acc1a86cdd0fc164ca925476 Mon Sep 17 00:00:00 2001 From: SVN Migration Date: Sun, 15 Oct 2006 21:09:28 +0000 Subject: This commit was manufactured by cvs2svn to create branch 'PECL_OPENSSL'. --- ext/zip/examples/comment.php | 6 ------ ext/zip/examples/create.php | 20 ----------------- ext/zip/examples/dir.php | 17 --------------- ext/zip/examples/extract.php | 24 --------------------- ext/zip/examples/extractAll.php | 24 --------------------- ext/zip/examples/fopen.php | 31 --------------------------- ext/zip/examples/get_set_comments.php | 38 --------------------------------- ext/zip/examples/im.php | 11 ---------- ext/zip/examples/odt.php | 20 ----------------- ext/zip/examples/oldapi.php | 17 --------------- ext/zip/examples/test.odt | Bin 6162 -> 0 bytes ext/zip/examples/test.zip | Bin 541 -> 0 bytes ext/zip/examples/test1.zip | Bin 681 -> 0 bytes ext/zip/examples/test_im.zip | Bin 1086 -> 0 bytes ext/zip/examples/test_with_comment.zip | Bin 560 -> 0 bytes ext/zip/examples/too.php | 2 -- 16 files changed, 210 deletions(-) delete mode 100644 ext/zip/examples/comment.php delete mode 100644 ext/zip/examples/create.php delete mode 100644 ext/zip/examples/dir.php delete mode 100644 ext/zip/examples/extract.php delete mode 100644 ext/zip/examples/extractAll.php delete mode 100644 ext/zip/examples/fopen.php delete mode 100644 ext/zip/examples/get_set_comments.php delete mode 100644 ext/zip/examples/im.php delete mode 100644 ext/zip/examples/odt.php delete mode 100644 ext/zip/examples/oldapi.php delete mode 100644 ext/zip/examples/test.odt delete mode 100644 ext/zip/examples/test.zip delete mode 100644 ext/zip/examples/test1.zip delete mode 100644 ext/zip/examples/test_im.zip delete mode 100644 ext/zip/examples/test_with_comment.zip delete mode 100644 ext/zip/examples/too.php (limited to 'ext/zip/examples') diff --git a/ext/zip/examples/comment.php b/ext/zip/examples/comment.php deleted file mode 100644 index 90b37d3795..0000000000 --- a/ext/zip/examples/comment.php +++ /dev/null @@ -1,6 +0,0 @@ -open('test_with_comment.zip'); -// Add "Foo Comment" as comment for the foo entry -$z->setCommentName('foo', 'Too Comment ' . time()); -$z->close(); diff --git a/ext/zip/examples/create.php b/ext/zip/examples/create.php deleted file mode 100644 index cffacee93b..0000000000 --- a/ext/zip/examples/create.php +++ /dev/null @@ -1,20 +0,0 @@ -open($filename, ZIPARCHIVE::CREATE)) { - exit("cannot open <$filename>\n"); -} else { - echo "file <$filename> OK\n"; -} - -$zip->addFromString("testfilephp.txt" . time(), "#1 This is a test string added as testfilephp.txt.\n"); -$zip->addFromString("testfilephp2.txt" . time(), "#2 This is a test string added as testfilephp2.txt.\n"); -$zip->addFile($thisdir . "/too.php","/testfromfile.php"); -echo "numfiles: " . $zip->numFiles . "\n"; -echo "status:" . $zip->status . "\n"; -$zip->close(); -unset($zip); diff --git a/ext/zip/examples/dir.php b/ext/zip/examples/dir.php deleted file mode 100644 index 00e4b40585..0000000000 --- a/ext/zip/examples/dir.php +++ /dev/null @@ -1,17 +0,0 @@ -open('test_with_comment.zip'); -print_r($za); -var_dump($za); -echo "numFiles: " . $za->numFiles . "\n"; -echo "status: " . $za->status . "\n"; -echo "statusSys: " . $za->statusSys . "\n"; -echo "filename: " . $za->filename . "\n"; -echo "comment: " . $za->comment . "\n"; - -for ($i=0; $i<$za->numFiles;$i++) { - echo "index: $i\n"; - print_r($za->statIndex($i)); -} -echo "numFile:" . $za->numFiles . "\n"; diff --git a/ext/zip/examples/extract.php b/ext/zip/examples/extract.php deleted file mode 100644 index 696502ba12..0000000000 --- a/ext/zip/examples/extract.php +++ /dev/null @@ -1,24 +0,0 @@ -filename . "\n"; -$zip->open("test.zip"); -/* -$zip->addFile("./modules/"); -$zip->addFile("./testempty"); -*/ -echo $zip->status . "\n"; -echo $zip->statusSys . "\n"; - -echo $zip->numFiles . "\n"; -echo $zip->filename . "\n"; -var_dump($zip); -$files = array('test', 'testdir/test2'); -if (!$zip->extractTo("./testext/path/to", $files)) { - echo "error!\n"; - echo $zip->status . "\n"; - echo $zip->statusSys . "\n"; - -} - -$zip->close(); diff --git a/ext/zip/examples/extractAll.php b/ext/zip/examples/extractAll.php deleted file mode 100644 index d318a453df..0000000000 --- a/ext/zip/examples/extractAll.php +++ /dev/null @@ -1,24 +0,0 @@ -filename . "\n"; -$zip->open("test.zip"); -/* -$zip->addFile("./modules/"); -$zip->addFile("./testempty"); -*/ -echo $zip->status . "\n"; -echo $zip->statusSys . "\n"; - -echo $zip->numFiles . "\n"; -echo $zip->filename . "\n"; -var_dump($zip); -$files = array('test', 'testdir/test2'); -if (!$zip->extractTo("./testext/path/to")) { - echo "error!\n"; - echo $zip->status . "\n"; - echo $zip->statusSys . "\n"; - -} - -$zip->close(); diff --git a/ext/zip/examples/fopen.php b/ext/zip/examples/fopen.php deleted file mode 100644 index 5af37b1ab3..0000000000 --- a/ext/zip/examples/fopen.php +++ /dev/null @@ -1,31 +0,0 @@ -open(dirname(__FILE__) . '/test.zip'); -$fp = $z->getStream('test'); - -var_dump($fp); -if(!$fp) exit("\n"); -while (!feof($fp)) { - $contents .= fread($fp, 2); -} - -fclose($fp); -file_put_contents('t',$contents); -echo "done.\n"; - - diff --git a/ext/zip/examples/get_set_comments.php b/ext/zip/examples/get_set_comments.php deleted file mode 100644 index 5bd302e6da..0000000000 --- a/ext/zip/examples/get_set_comments.php +++ /dev/null @@ -1,38 +0,0 @@ -open('t.zip'); - -print_r($z); - -for ($i=0; $i<$z->numFiles; $i++) { - echo "index: $i\n"; - print_r($z->getCommentIndex($i)); - echo "\n\n"; -} -echo "foobar/ " . $z->getCommentName('foobar/') . "\n"; - -echo "Archive comment: " . $z->getArchiveComment() . "\n"; - - -$z->setCommentIndex(1, 'new comment idx 1'); -$z->setCommentName('foobar/', 'new comment foobar/'); - -$z->setArchiveComment( 'new archive comment'); - -for ($i=0; $i<$z->numFiles; $i++) { - echo "index: $i\n"; - print_r($z->getCommentIndex($i)); - echo "\n\n"; -} - -echo $z->getCommentName('foobar/') . "\n"; - -// Get the original comment -echo $z->getCommentName('foobar/', ZIPARCHIVE::FL_UNCHANGED) . "\n"; - -echo "Archive comment: " . $z->getArchiveComment() . "\n"; -echo "Archive comment (original): " . $z->getArchiveComment(ZIPARCHIVE::FL_UNCHANGED) . "\n"; - diff --git a/ext/zip/examples/im.php b/ext/zip/examples/im.php deleted file mode 100644 index 3721434054..0000000000 --- a/ext/zip/examples/im.php +++ /dev/null @@ -1,11 +0,0 @@ -open(dirname(__FILE__) . '/test_im.zip'); -$im_string = $z->getFromName("pear_item.gif"); -$im = imagecreatefromstring($im_string); -imagepng($im, 'b.png'); - diff --git a/ext/zip/examples/odt.php b/ext/zip/examples/odt.php deleted file mode 100644 index c829f12343..0000000000 --- a/ext/zip/examples/odt.php +++ /dev/null @@ -1,20 +0,0 @@ -open('zip://' . dirname(__FILE__) . '/test.odt#meta.xml'); -$odt_meta = array(); -while ($reader->read()) { - if ($reader->nodeType == XMLREADER::ELEMENT) { - $elm = $reader->name; - } else { - if ($reader->nodeType == XMLREADER::END_ELEMENT && $reader->name == 'office:meta') { - break; - } - if (!trim($reader->value)) { - continue; - } - $odt_meta[$elm] = $reader->value; - } -} -print_r($odt_meta); diff --git a/ext/zip/examples/oldapi.php b/ext/zip/examples/oldapi.php deleted file mode 100644 index 2f17f43ebd..0000000000 --- a/ext/zip/examples/oldapi.php +++ /dev/null @@ -1,17 +0,0 @@ -