Pawel posted on 2008-11-25 14:22:40 #
Hello
I have problem with Yours zip extension for zip folder class described here:
http://www.web-development-blog.com/archives/tutorial-create-a-zip-file-from-folders-on-the-fly/
I get lot of error with wordpress changing some signs. I try to remove all of them and now have no errors but code dosnt works.
could You mail my proper code or post it here with some tips how You use it ?
I need simple solution to zip folder containing photos and print a link to it to share it via ftp, so I need full path on server to store zip files (out of http) if this change something?
The most popular forum posts:
Comments / discussions
Olaf posted on 2008-11-25 14:53:01 #
Hi,
I don't have an example file (my own are very custom so you can't use them)
Check the code from the blog an replace single/double quotes.
(btw. I use the linux zip commands, check the quote at the end of the post)
Olaf posted on 2008-11-25 14:58:53 #
ooh I see replace
-& g t ; (without the spaces)
with
->
Pawel posted on 2008-11-25 17:42:57 #
So .. I made it before ...
As I understand You dont have a clean copy of this file/s which was used in blog article?
I will ask something else:
Where should I put extension (I place it on end of class which I require)
and
$createZip = new createDirZip;
$createZip->addDirectory($dir_name);
$createZip->get_files_from_folder('$dir_name', 'patch/to/another/account/on/this/same/server/where/is/anonymus/ftp');
As I expect this should bulid zip archive in ftp folder, or I miss something ?
And for last - Are You sure that only "->" was replaced in Wordpress?
I dont know what I mess ...
Olaf posted on 2008-11-25 18:46:40 #
I fixed the code in this blog post, do you get an error message?
Note that your path should be absolute (use the doc root variable)
do you did a test on that original class?
munchybugs posted on 2008-12-11 22:25:29 #
Hey Olaf, would it be possible to use the php zip class (your example) from a form that let's say has a checkbox with different items and then whatever the user checked, it would then possibly zip those files? Is this possible? I can even pay for this too. Thanks!
Olaf posted on 2008-12-12 05:31:32 #
That should be be possible, make from the check boxes an array:
<input type="checkbox" name="sel_file[]" value="yourfile.ext" />
after the form is submitted loop trough this array:
foreach ($_POST['sel_file']) as $key => $val) {
// the sip code here
}