Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Unzip a tar.gz file?
October 22, 2008, 8:45 pm
rate this thread
sitting on my server in the current script's directory:
$projects = ftp_nlist($c, ".");
ftp_get($c, $projects, $projects, FTP_ASCII);
// Local file is $projects
How could I uncompress that archive into the local directory, assuming
a tar.gz filetype? I'm lost at sea in these docs:
Re: Unzip a tar.gz file?
If you're not on a Unix, you may want to check out the PEAR
Archive_Tar class. You have to untar the file before using zlib.
Perhaps the class takes care of the compression, too; I haven't used
If you're having trouble with the PHP manual concerning gzip (or
anything, really), I suggest you read the user comments, as well.
There may be existing contributions that solve your problem exactly.
If not, stick with it, and practice by writing code until it starts to