writing a zip resource to disk as a file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
twrofpwr
Forum Newbie
Posts: 17
Joined: Wed Jun 15, 2005 8:46 pm

writing a zip resource to disk as a file

Post by twrofpwr »

Hey guys, how do you write a zip resource to disk opened with zip_open / zip_read... I'm not quite sure how this works thanks for any help

Jeff
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Zip as in compressed files? Please give a little more information.
twrofpwr
Forum Newbie
Posts: 17
Joined: Wed Jun 15, 2005 8:46 pm

Post by twrofpwr »

hey guys I actually figured out how to do what I need to do... Sorry I should do a bit more research before posting up here, it just took me 15 mins or so to find out what I needed to do.. Baiscaly I just had to get the entire contents of the file with $buf = zip_entry_read($zip_file, zip_entry_filesize($zip_file)); and then use fwrite(....)

Ask the bear.. :P (a guy I worked with had a proff that had a stuffed bear outside his office.. he would make you ask it your question before ever talking to you :P
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

A stuffed bear... I like it. Besides, it's not like we don't ask you to do a little research :wink: ...

/me invisions picture of a Caveman mod in a restaurant...
Post Reply