To Un-tar with PHP?

Discussion in 'PHP' started by nfd2005, Apr 15, 2006.

  1. #1
    Hello all,

    I've ran into a problem.

    Is it possible to untar a .tar file with php.

    I haven't found many scripts to do this...
    exec('tar xvf pics-farm-ranch-20060413.tar')
    This is the only thing I found.

    All I wish to do is extract image files from this tar on the server.

    Unix
    Apache
    PHP 4

    Hope someone could help.

    -NFD
     
    nfd2005, Apr 15, 2006 IP
  2. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #2
    And what's wrong with doing it in the shell? (like you've mentioned)
     
    exam, Apr 15, 2006 IP
  3. nfd2005

    nfd2005 Well-Known Member

    Messages:
    295
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    130
    #3
    oops.

    Apparently I didn't enter the correct way to untar...

    as I found that "tar -xvf pics-farm-ranch-20060413.tar" works just fine..
     
    nfd2005, Apr 15, 2006 IP