Extracting files

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
kums
Forum Newbie
Posts: 2
Joined: Sun Jan 05, 2003 9:12 am

Extracting files

Post by kums »

Hello everyone,

I need a help in extracting files, thru PHP. Is that possible to extract files from .tar, .gzip and zip files thru PHP.

Can anyone help me.


Thanks,
KumS
User avatar
Elmseeker
Forum Contributor
Posts: 132
Joined: Sun Dec 22, 2002 5:48 am
Location: Worcester, MA

Post by Elmseeker »

You could use the exec() function to achieve this, check out http://www.php.net/manual/en/function.exec.php...Have fun. :)
User avatar
BigE
Site Admin
Posts: 139
Joined: Fri Apr 19, 2002 9:49 am
Location: Missouri, USA
Contact:

Post by BigE »

Acually, PHP has extensions. First for gz there is the zlib extension. This can be found at http://www.php.net/zlib and for zip files you can use the zip extension. This can be found at http://www.php.net/zip Hope that helps.
kums
Forum Newbie
Posts: 2
Joined: Sun Jan 05, 2003 9:12 am

Thanks

Post by kums »

Thks for ur replies,

Can u show a example, ie i have to extract a text file from the tar,zip or .gz and read the text file and write it in DB. I just need an example of extracting the text files in a particular folder.

Thks again
KumS
Post Reply