|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-06-26 17:26 UTC] irokez at gmail dot com
[2006-06-26 18:45 UTC] pierre dot php at gmail dot com
[2006-06-27 11:38 UTC] pierre dot php at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 03:00:01 2025 UTC |
Description: ------------ I use create.php example from CVS and it works when creating new ZIP archive, but when I attempt to open existing one and add file, Zip::status sets equal to ZIP:ER_RENAME or 2 and archive is not modified (file is not added). Reproduce code: --------------- <?php error_reporting(E_ALL); $thisdir = dirname(__FILE__); $filename = $thisdir . "/test112.zip"; $zip = new Zip(); if (!$zip->open($filename/*, ZIP::CREATE*/)) { exit("cannot open $filename\n"); } else { echo "file $filename OK\n"; } $zip->addFromString("2.txt", "=)"); $zip->close(); echo "numfiles: " . $zip->numFiles . "\n"; echo "status:" . $zip->status . "\n"; ?> Expected result: ---------------- supposed to get: numfiles: 1 status: 0 Actual result: -------------- actually get: numfiles: 1 status: 2