I have a variable which contains the html content, $html
and a variable with the pdf content $pdf
.
I can create zip files by using $zip->addFile($file,$file);
where $file is a file on the disk
However, I want to create zip files with content from the variables, without having to write them to disk first. How do I do it?
I am already storing $html and $pdf as-is in the db. Zipping them would help me save some space in my db.
My next question will most probably be how do I unzip contents without unzipping them to disk first, but let's see.