 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to read a single file inside a zip archive with PHP
To read a single fine inside z zip archive, the code is as follows −
$handle = fopen('zip://test.zip#test.txt', 'r'); $result = ''; while (!feof($handle)) {    $result .= fread($handle, 8192); } fclose($handle); echo $result; The output will be the contents of the zip file.
Advertisements
 