|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-04-24 14:32 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Package: zip
+Package: Zip Related
-Assigned To:
+Assigned To: cmb
[2015-04-24 14:32 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 10:00:01 2025 UTC |
Description: ------------ i want to make zip with password. But i think zipArchive::setPassword don't work. When using setPassword that making protected zip. right? so, i want to reply mail about that. thank. Test script: --------------- $zip = new ZipArchive (); $file = "1.txt"; $zipPath = 'test.zip'; if (($zip->open ( $zipPath, ZipArchive::CREATE)) == true) { $z = $zip->addFile ( $file ); if($z !== false){ //var_dump($z); } $a = $zip->setPassword('abc'); $zip->close (); echo "okey"; Expected result: ---------------- Created ZIP archive should have a password protection, and when opening it on a local machine with WinZIP, the program should ask for the password prior to open the archive.