Zip all files and download php codeigniter
Connect and share knowledge within a single location that is structured and easy to search. I am trying to create a zip file including 2 text files and download it. Here is my code. I found out the solution. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Zip multiple files and download using php codeigniter Ask Question.
Asked 4 years, 1 month ago. Active 4 years, 1 month ago. In this step we need to add one route for download zip file after creating. Here, we need to create ZipController with index method.
I write creating zip file code and download code on index. Let's just create it. My name is Hardik Savani. I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. If the value is a directory then create an empty directory and call createZip function where pass the directory path. View Demo. The above-defined function createZip accepts the path of the directory as a parameter. It will read all files and folders from the path and add them to the zip file.
You can also use ZipArchive Class to unzip the Zip file.
0コメント