Jump to content

PHP CodeIgnitor - Zip Library Query


Recommended Posts



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);

Any help much appreciated.






Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.