Welcome Guest, Not a member yet? Register   Sign In
How to use ZipArchive
#1

(This post was last modified: 10-15-2020, 12:34 AM by what2see.)

Hi, I'm trying to use ZipArchive in my CI4 project. It is already enabled in my php but still give me error. Can someone tell me how to use this in CI4? Thank you.

Attached Files Thumbnail(s)
   
Reply
#2

What is ZipArchive? Post your code...
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#3

(This post was last modified: 10-18-2020, 04:22 PM by InsiteFX.)

First you need to read this:

PHP.NET - The ZipArchive class

Then in your controller you need to do this before using it.

PHP Code:
$zip = new \ZipArchive(); 
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

(This post was last modified: 10-18-2020, 12:16 PM by captain-sensible.)

a possible alternative might be to look https://packagist.org/?query=zip

(10-18-2020, 11:44 AM)InsiteFX Wrote: First you need to read this:

PHP.NET - The ZipArchive class

Then in your controller you need to do this before using it.

PHP Code:
$zip = new /ZipArchive(); 
should thst not be a "\"
Reply
#5

Thanks I corrected it long day here
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB