0

http://pastebin.com/AreCLL5W

Could anyone help me with this, I've been trying all day to get a file to compress for email but for some reason it's failing to compress ? I have a feeling I'm doing something wrong (it's probably staring me in the face)

Lewis
  • 139
  • 6
  • 3
    yet another question with "I have a problem" without saying which is the problem/error lol :) – dynamic Jun 14 '11 at 22:36
  • It's just not producing a file, I have a feeling it's to do with my variable usage. I have with no variable usage (e.g "test.zip") and it works fine ? – Lewis Jun 14 '11 at 22:39
  • That pastebin is pretty much useless as it does not show the code you are using to zip the file. – Stephane Gosselin Jun 14 '11 at 22:45

1 Answers1

0

If you are having problems with that function, i would suggest the function from this answer.

I personally have used that function before and it works like a dream and is easy to understand.

It works for both files and folders.

Community
  • 1
  • 1
Kristoffer la Cour
  • 2,591
  • 3
  • 25
  • 36
  • From the above linked answer, the original asker's problem might be because they do not have the zip extension installed. Make sure that "if (extension_loaded('zip') === true)" is true. – rlorenzo Jun 14 '11 at 23:09
  • The problem was actually down to incorrect capture of the download code. – Lewis Jun 15 '11 at 11:43