Compression-php get the contents of RAR file, output to how to parse?
Source: Internet
Author: User
KeywordsCompressing extended PHP Array objects
Compressing extended PHP Array objects
Recently there is a requirement: The file name inside the RAR archive, the size to get out, parse into JSON output; Read the countless information, learned to add php_rar.dll (if it is zip, add php_zip.dll extension), and finally through the program to get the relevant content of RAR, but the content of the contents of the format does not know how to parse into JSON, ask the big God pointing twos.
$rar _file = Rar_open (' 222.rar ') or Die ("Failed to open rar archive"); $entries _list = Rar_list ($rar _file); Header (' Content-type:text/plain ');p rint_r ($entries _list);
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.