PclZip 2.6 : New features on individual files

Saturday, 21 July 2007 00:00 Vincent

PclZip 2.6 introduce new granular functions at the file level. You can now add a string as a file in an archive, without the need to create temporary files when a string need to be put in a zip archive.

PclZip 2.6 also correct some bugs.

User manual is not yet updated so you can find some informations bellow :

$archive = new PclZip("archive.zip");
$v_filename = "new_file.txt";
$v_content = "This is the content of file one\nHello second line";
$list = $archive->create(array(
PCLZIP_ATT_FILE_NAME => $v_filename,
if (
$list == 0) {
"ERROR : '".$archive->errorInfo(true)."'");

The content of string "$v_contenu" will be added in the archive as a file with name 'new_file.txt'.

Last Updated on Sunday, 07 February 2010 15:24