Re: howto get .tar.gz content's filenames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, December 3, 2007 9:05 pm, Shelley Shyan wrote:
> It may not be a php question, but I want to get the filename lists
> that a .tar.gz file contains and give it to an array.
> How can I manage that?

I thought there was a 'tar' PHP extension, but don't see it now...

There is a 'gzip' you can use to unzip it...

If all else fails, punt to the OS:

<?php
  exec('/full/path/to/your/binary/tar -tzvf
/full/path/to/file.tar.gz', $output, $error);
  var_dump($output);
  if ($error){
    echo "OS Error: $error\n";
  }
?>

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux