How to zip a file in CI4 |
i have worked with CI3 which provided zip library but in CI4 there no such library. so i decided to go with php zipArchieve() im having an issue with that on server. Can anyone suggest a good zip library or how to go about using zipArchieve in CI4. thanks
You can try this one.
Ne-Lexa - PhpZip What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
If your server has the right extension installed, PHP has it built in.
I'm trying to use php ZipArchive in my CI4 project. It is already enabled but it always give me this error: Class 'App\Controllers\ZipArchive' not found
Can you help me how to use ZipArchive? Thanks.
Prepend the namespace separator to ZipArchive. Like this
$zip = new \ZipArchive(); or if you do not want that. Try this instead, <?php namespace App\Controllers; use ZipArchive; $zip = new ZipArchive(); |
Welcome Guest, Not a member yet? Register Sign In |