Re: ZipArchive class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The first example shows you how it is done: https://www.php.net/manual/en/ziparchive.addfile.php

The second param is the "where you want it stored", ex: emptyDir/addedFile.txt and the first param is the "where it is now" local filename.

On Fri, Mar 13, 2020 at 8:57 PM Jeffry Killen <jekillen@xxxxxxxxxxx> wrote:
Hello again;

I am again trying to tame the ZipArchive class.

My current question is:

So I create an empty dir and I want to add a
file to the empty dir:

Can I use addFile and have it placed in the empty
dir as 'emptyDir/addedFile' ?

or is addFile only going to place it along side
of emptyDir.

I am not able to glean this from the manual.

I am concerned about downloading a single
directory for unzip on client system (Mac in my
case for local dev purposes) and having the
single dir show up with designated contents.

Thank you for time and attention;
JK

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux