i'm trying to load the zip library, but for some reason i cant't, it show me this error:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: CI::$zip
Fatal error: Call to a member function add_data() on a non-object in C:\xampp\htdocs\cinetaller\frontend-cin\controllers\usuario.php on line 72
This is the code from my controller:
public function index(){
$this->load->library('zip');
$data = array();
$data['www'] = $this->config->item('base_www');
$data['alumno'] = $this->malumno->getById(1)->row();
echo "start zip";
$name = 'mydata1.txt';
$dataZ = 'A Data String!';
$this->zip->add_data($name, $dataZ);
// Write the zip file to a folder on your server. Name it "my_backup.zip"
$this->zip->archive($data['www'].'/uploads/'.$data['alumno']->id);
// Download the file to your desktop. Name it "my_backup.zip"
$this->zip->download('my_backup.zip');
echo "done";
}
I'm shure, that the zip library is in the core system, but for a no reason i can't load it.