Welcome Guest, Not a member yet? Register   Sign In
Zip files from URL
#3

I think you have misunderstood how the add_data function works when using an array. You are trying to use the file key as path, which is incorrect.
  1. The parameters are ordered as file => contents, first parameters being the file name you want to have in the zip file, and the second parameter being the content to put into that file.

  2. For the content, the add_data function do not support reading a file. You either have to use the read_file function or read the file yourself by using file_get_contents()

  3. As far as I'm aware, the zip library do not support reading external urls. The paths has to be to a file on your server. If your server support reading external urls, you should be able to use file_get_contents()

http://www.codeigniter.com/userguide3/li...s/zip.html
Reply


Messages In This Thread
Zip files from URL - by behnampmdg3 - 03-08-2015, 11:39 PM
RE: Zip files from URL - by behnampmdg3 - 03-09-2015, 07:33 PM
RE: Zip files from URL - by silentium - 03-10-2015, 12:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB