help with ZIP library - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: help with ZIP library (/showthread.php?tid=30426) |
help with ZIP library - El Forum - 05-14-2010 [eluser]Skuja[/eluser] How can i read directory inside other directory than root? for example: Code: $this->zip->add_dir('my_project'); help with ZIP library - El Forum - 05-14-2010 [eluser]Skuja[/eluser] Actually i had to figure out 2 problems. First was mentioned above. Second is that i need to compress only those files and folders inside $this->data_path not the whole path. I extended Zip library and with a dirty hack made some changes to it: Code: <?php One weird thing is that it compresses only those folders which contains files. Why? And now i need to solve a new problem: How to delete zip folder after download() method is called - i believe it cant be done because of exit() in force_download() helper function. Any Ideas/Suggestions? help with ZIP library - El Forum - 01-18-2011 [eluser]Unknown[/eluser] The reason why the zip helper only compresses non-empty folders is because of the check "substr($file, 0, 1) != '.'" which has another side effect on linux, which is not to add hidden files to the archive. I would suggest the maintainer of the online documentation to add a few lines specifying the exact behavior of the read_dir function, since as it stands it is misleading. |