I have a project where I would like to create a dynamical directory tree structure without to save it on server, compress it and push it to download. Is it possible to do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You are probably looking for something like
ZipArchive::addEmptyDir, which can be used to create empty directory in ZIP archive. You later can add files to that directory.You’ll still need to save the resulting archive to disk…
If you desire to stream the archive without saving the archive on your end, you may try to look at PHPZip class