public function store($location){
if($this->zip->open($location, file_exists($location) ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE)){
foreach($this->files as $file){
$this->count++;
$this->image_name ="OrderImg".$this->count.".png";
$this->set = str_replace('data:image/png;base64,', '', $file);
$this->set = str_replace(' ', '+', $file);
$this->zip->addFile($this->image_name, base64_decode($file));
}
$this->zip->close();
}
}
how to i decode my canvas data with base64 and put in to my zip file , i cant make it work here , my intention is to get my canvas data decode with base64 and zip it together.
the zip file didt create and i have no idea why.