Posts: 1
Threads: 1
Joined: Jun 2020
Reputation:
0
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
Posts: 4
Threads: 3
Joined: Jun 2020
Reputation:
0
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.
Posts: 137
Threads: 4
Joined: Jul 2020
Reputation:
2
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();