ZipArchive php Class - is it built into PHP?

Well, just wondering what versions of PHP are built into this class. And if they are built into all platforms (OS). I need an approach to searching through a zip file and placing files using file_put_contentsdifferent files paths inside webroot. In any case, I am familiar with how to do this with the ZipArchive class, but I wonder if using this class would be a good solution and MOST support if not ALL servers? I mean, I would prefer not to use a method that requires the server to install it. I am looking for a solution for this that will support at least MOST servers without having to set a class ...

Thank:)

Also, I would like to support open tar.gz and / or .tgz files if possible, but I don't think the ZipArchive class supports this, but maybe another built-in php class does ??

+5
source share
1 answer

Tar support is not built into PHP, but if you look at the PEAR library, you can find some classes that support creating / retrieving tarballs (among others). Take a look at http://pear.php.net/package/Archive_Tar or http://pear.php.net/package/File_Archive . The latter should be a common interface for several archiving formats (including ZIP and TAR).

, ZIP, , , . , , , ZipArchive, class_exists('ZipArchive'); ...

+9

All Articles