Jump to content

Extract zip/rar files?


Guldstrand

Recommended Posts

Is this the only way?

There's always PHP's zip extension.... don't know about rar though

I´ve allready tried that, but that gave me:

Fatal error: Class 'ZipArchive' not found in ...

Is there any zip extension/function that´s enabled by "default"?

Link to comment
https://forums.phpfreaks.com/topic/147178-extract-ziprar-files/#findComment-772631
Share on other sites

Is there any zip extension/function that´s enabled by "default"?

Short answer: "No".

If there was, then there'd be no need for the extension.

 

If you do the build yourself, then you simply enable it in the build configuration. If your ISP controls your PHP build, then you'd have to ask if they could enable it for you.

 

Link to comment
https://forums.phpfreaks.com/topic/147178-extract-ziprar-files/#findComment-772636
Share on other sites

Is there any zip extension/function that´s enabled by "default"?

Short answer: "No".

If there was, then there'd be no need for the extension.

 

If you do the build yourself, then you simply enable it in the build configuration. If your ISP controls your PHP build, then you'd have to ask if they could enable it for you.

 

Well.. since this is for a plugin-system to an open source project, i really don´t want the users to have all the "hassle" with enabling extensions.

 

I know that SMF has a extract-function that works.

http://support.simplemachines.org/function_db/index.php?action=view_function;id=269

Link to comment
https://forums.phpfreaks.com/topic/147178-extract-ziprar-files/#findComment-772640
Share on other sites

I know that SMF has a extract-function that works.

Correct, because they've written it by hand.

PHP has no simple function to extract files from a zip unless you install the zip extension.

 

Being aware of SMF's read_zip_data() function, why don't you contact the developers (Simple Machines LLC) and ask their permission to use it?

Link to comment
https://forums.phpfreaks.com/topic/147178-extract-ziprar-files/#findComment-772654
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.