MoFish Posted March 9, 2016 Share Posted March 9, 2016 Hi, I have a folder called "skeleton" which sits in the root of my website. Inside the folder is a selection of folders and files e.g. -- skeleton -- areas -- uk.html -- pages -- contact.html -- index.html -- images -- panda.jpg -- javascript -- jquery.js Using code ignitors built in zip library I have managed to successfully get zip a folder with all the child files/folders, however it is also including the root "skeleton" folder inside the zip file which i'm trying to exclude. Does anyone know if there is a way to exclude the root directory you are zipping? I have had a read of the documentation at https://ellislab.com/codeigniter/user-guide/libraries/zip.html and cannot find the answer or am simply overlooking it. My code is as follows: $this->zip->read_dir("./skeleton", false); $this->zip->archive($this->skeleton_path."remote_skeleton.zip"); Any help much appreciated. Thanks, MoFish Quote Link to comment https://forums.phpfreaks.com/topic/300963-php-codeignitor-zip-library-query/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.