How to implement ziprar compressed file preview with php in QQ mailbox transfer station

Source: Internet
Author: User
QQ mailbox transfer station ziprar compressed file preview using php is how to achieve? It is very powerful and suitable for me, but I don't know how to implement it. & lt ;? Php $ zip = zip_open (& quot; your zip file, note the path, such as C: \ AppServ \ www/myzip.zip & quot;); if ($ zip) QQ mailbox transfer station zip rar compressed file preview using php is how to achieve?
It's so powerful that it suits me very well, but I don't know how to implement it.

------ Solution --------------------

$ Zip = zip_open ("Your zip file, pay attention to the path, such as C: \ AppServ \ www/myzip.zip ");

If ($ zip ){
While ($ zip_entry = zip_read ($ zip )){
Echo "Name:". zip_entry_name ($ zip_entry). "\ n ";
Echo "Actual Filesize:". zip_entry_filesize ($ zip_entry). "\ n ";
Echo "Compressed Size:". zip_entry_compressedsize ($ zip_entry). "\ n ";
Echo "Compression Method:". zip_entry_compressionmethod ($ zip_entry). "\ n ";

If (zip_entry_open ($ zip, $ zip_entry, "r ")){
Echo "File Contents: \ n ";
$ Buf = zip_entry_read ($ zip_entry, zip_entry_filesize ($ zip_entry ));
Echo "$ buf \ n ";

Zip_entry_close ($ zip_entry );
}
Echo "\ n ";

}

Zip_close ($ zip );

}
?>

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.