Welcome Guest, Not a member yet? Register   Sign In
Zip global
#1

[eluser]Browser[/eluser]
Hello, how can i do a unique file zip ? the people in different pages press "Add pdf to zip", but i dont know how can i do in only one file. I am using the zip class.

Thanks you.
#2

[eluser]whitey5759[/eluser]
This is normally how I would do it, but I haven't done so in CI (haven't had the need yet): http://php.net/manual/en/function.tempnam.php
#3

[eluser]Ben Edmunds[/eluser]
Hey browser,

Sorry but I don't quite understand your post.

Can you be a little more descriptive?
#4

[eluser]Browser[/eluser]
I have a lot of documents in my web. They are in different pages and the user can go adding documents to file .zip . I want that the user download only a file.zip with all the documents selected previosly.
#5

[eluser]Ben Edmunds[/eluser]
Read up on the documentation here: http://ellislab.com/codeigniter/user-gui...s/zip.html

You can use read_file to add the files you need to the zip.
#6

[eluser]Browser[/eluser]
Yes, but i use read_file in other pages and the file.zip is not the same. I want campile all in the same file, but i cannot use a global vars.
#7

[eluser]Ben Edmunds[/eluser]
So you want users to be able to select files on multiple pages that in the end are combined into one zip file?
#8

[eluser]BrianDHall[/eluser]
I'd think the best would be to collect them in session vars then add them all at once. Otherwise you need to store a temporarily file.zip and add to it as you go along, which is definately a lot more complicated.
#9

[eluser]Browser[/eluser]
Yes.




Theme © iAndrew 2016 - Forum software by © MyBB