PECL zip-Extension 1.9.0 wurde veröffentlicht

PECL zip-Extension 1.9.0 wurde veröffentlicht

Für das PHP-PECL-Paket ist die zip-Extension in der Version 1.9.0 veröffentlicht worden. Neben kleineren Bugfixes (Changelog) wurden die Funktionen "addGlob" und "addPattern" der zip-Extension hinzugefügt. Mit diesen Funktionen lassen sich nun auch Pfade innerhalb des Zip-Archivs bearbeiten bzw. löschen (Diese Funktionen sind Experimentell).

Beispiel addGlob


<?php
$z = new ZipArchive;
$z->open('a.zip', ZIPARCHIVE::CREATE);
/* or 'remove_all_path' => 0*/
$options = array(
 'remove_path' => '/home/francis/myimages',
 'add_path' => 'images/',
);
$found = $z->addGlob("/home/tests/*.png", 0, $options);
var_dump($found);
$z->close();
?>

Beispiel addPattern


<?php
$z = new ZipArchive;
$z->open('a.zip', ZIPARCHIVE::CREATE);
/* or 'remove_all_path' => 0*/
$options = array('remove_path' => '/home/tests',
'add_path' => 'images/',
);
$found = $z->addPattern("/(\.png)$/i", "/home/tests", $options);
var_dump($found);
$z->close();
?>

Die PECL zip-Extension kann in der neuesten Version hier downgelodet werden: http://pecl.php.net/package/zip/1.9.0








XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Blogroll

Lorem ipsum

These 3 boxes are widgets and can be edited through the admin page, just like the sidebar.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Impressum