unzip

Unzip a file with php

狂风中的少年 提交于 2019-11-25 23:48:17
问题 I want to unzip a file and this works fine system(\'unzip File.zip\'); But I need to pass in the file name through the URL and can not get it to work, this is what I have. $master = $_GET[\"master\"]; system(\'unzip $master.zip\'); What am I missing? I know it has to be something small and stupid I am overlooking. Thank you, 回答1: I can only assume your code came from a tutorial somewhere online? In that case, good job trying to figure it out by yourself. On the other hand, the fact that this

Unzipping files

戏子无情 提交于 2019-11-25 23:36:51
问题 I want to display OpenOffice files, .odt and .odp at client side using a web browser. These files are zipped files. Using Ajax, I can get these files from server but these are zipped files. I have to unzip them using JavaScript, I have tried using inflate.js, http://www.onicos.com/staff/iz/amuse/javascript/expert/inflate.txt, but without success. How can I do this? 回答1: I wrote an unzipper in Javascript. It works. It relies on Andy G.P. Na's binary file reader and some RFC1951 inflate logic