How can I use ZipArchive to write the annotation on the right of a compressed package? (That is, some descriptions about the compressed package on the right)
Source: Internet
Author: User
How can I use ZipArchive to generate the annotation on the right of the compressed package? (That is, some instructions on the compressed package on the right) how can I generate the annotation on the right of the compressed package by editing the zip file on bxline from 2013-02-10:48:59 with ZipArchive? (That is, some descriptions about the compressed package on the right) the following code can only generate the annotation on the right of the compressed package by using ZipArchive? (That is, some descriptions about the compressed package on the right)
At last, this post was edited by bxline at 12:48:59. how can I use ZipArchive to write the annotation on the right of the compressed package? (That is, some descriptions about the compressed package on the right)
The following code can only be compressed. However, the descriptions on the right side of a compressed package cannot be generated. how can we generate a compressed package with descriptions on the right side,
How can I change the code?
$ Zip = new ZipArchive ();
If ($ zip-> open ('d:/aa.zip ', ZIPARCHIVE: CREATE )! = TRUE ){
Die ("cocould not open archive ");
}
$ Zip-> addFile ("d:/bb.txt", basename ("bb.txt "));
$ Zip-> close ();
Echo "Archive created successfully .";
?>
------ Solution --------------------
Please refer to this tutorial http://php.goldenweb.it/it/html/function.ziparchive-setarchivecomment.html
$ Zip = new ZipArchive ();
If ($ zip-> open ('d:/aa.zip ', ZIPARCHIVE: CREATE )! = TRUE ){
Die ("cocould not open archive ");
}
$ Zip-> addFile ("d:/bb.txt", basename ("bb.txt "));
$ Zip-> setArchiveComment ('annotate ');
$ Zip-> close ();
Echo "Archive created successfully .";
?>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service