Hi,

Can anybody guide me to solve this proble. I have to upload the zip file to the webserver. The php script should read the name of the zipfile and print it and also it should read the name of the text files that are zipped and the contents in the text file.

Also is there anyway to zip the files and make it available for downlaod using the php

Thanks in advance.

Recommended Answers

All 3 Replies

PHP has built in functionality for opening and zipping zip files. They should help you do this.

Do you have access to SSH client? If you do then you can run command
$: unzip filename

That should unzip it and then you can read the contents of the file.

Member Avatar for Rhyan

It is potentialy unsafe to manipulate with archive files, prior scanning them, even if the system is Unix-like. An archive better be scanned, then extracted to a directory, get the listing and then erase data.

Think it over prior implementing sucha functionality!

Still PHP can do it - there are zip/unzip functions built in, however a plugin should be active.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.