|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2007-01-29 20:52 UTC] tony2001@php.net
  [2007-01-29 21:58 UTC] ssites at nanlucian dot com
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 05:00:02 2025 UTC | 
Description: ------------ I create the archive but when I open it, the file(s) is (are) corrupted. With path or without path (at the first parameter), the file(s) is corrupted. Reproduce code: --------------- <?php $zip = new ZipArchive; $res = $zip->open('test.zip', ZipArchive::CREATE); if ($res === TRUE) { $zip->addFile('Untitled-1.jpg', 'Untitled-1.jpg'); $zip->close(); echo 'ok'; } else { echo 'failed'; } ?> Expected result: ---------------- I expect to open and extract the file(s) successfully. Actual result: -------------- The file(s) from created archive is (are) corrupted.