L
L
Leonid Fedotov2015-02-27 22:31:13
PHP
Leonid Fedotov, 2015-02-27 22:31:13

How to get a file from an archive without unpacking it?

You need a way, method, function, lib, class, extension that can get a file from a ZIP archive without completely unpacking it. For example, such a feature appeared (sort of) in Windows 8. When you open a file, the system prompts you to open either only one file, or unpack everything. And when opening a file from an archive, the system actually receives and opens this file without full unzipping. Here in PHP I would like a similar solution - so that only one file can be obtained from the archive. And it would be even better to read it directly, for example, through the readfile function. In addition, a solution implemented by standard PHP5+ tools would be a huge plus.
UPD: indeed, something turned out to be so easy :D

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2015-02-27
@iLeonidze

php.net/manual/en/ziparchive.getfromname.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question