Im having some problems zipping a directory.
The following line will do the trick but it also includes the root directory.
exec('zip -r '.$tmp_zip.' '.$filename_no_ext.'/rss-ticker/*');
So I only want to zip everything in the dir rss-ticker
How to fix this?
Thanks for your help
Unless you have an overwhelming reason not to (like a desire to cause yourself much pain and headache), you really should be using the ZipArchive toolkit. There is an example of how at this question.
As to getting zip to work with
exec, I noticed two points:$filename_no_extvariable in there. If you just have it be a.. Right now, because you’re startingrss-tickerwith/, it is assuming that the folder is at the root of the file-system. I don’t think you want that.*to get the command linezipfunction to work.