How to create a ZIP archive of two files?
Posted 13 July 2006 - 04:34 AM
In my php I am creating two files, both contain the output desired in different format, one in xml and one as plain csv. Let us say they are called abc.xml and abc.csv. These two files are created in a 'uploads' dir in the web server. I would next like to include these two files into a new ZIP archive called 'output.zip' or 'output'gz' (don't care). I read all about the zlib functions, but to me ot looks like when you open the file for writing you can use either fopne or gzopen. My problem is if I use gzopen I will still end up with two files (although they will now be zipped) and I cannot download two files using the 'force donwload' method.
My ultimate aim is when the user clicks 'Save files' the force download method will download the 'output.gz' file, provides capability to the user to save it wherever they want in the local file system. Once they have save and they unzip this file they can extract abc.xml and abc.csv.
How do I do this? Thanks for your time in advance.
Posted 13 July 2006 - 04:57 AM
Hope That Helps. Good Luck
Posted 13 July 2006 - 12:33 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users