Opening a zip + checking for file types?
Posted 19 August 2006 - 02:19 AM
For example: I click browse, find my file, push ok. Now I push my Submit button and it runs my php code to upload to file to my database.
I just need to have it check to see if it is a .zip file, and then open the zip and see if only one type of file is inside it (.txt file for exaple), and if anything other than a .txt is inside it will give an error and not upload.
If anyone can help me out that would be great. Thanks!
Posted 19 August 2006 - 02:26 AM
In order to do what you are wanting, you can use one of the libraries located at phpclasses.org:
to unzip the file to a location, then check each file that was unzipped using the dir functions (http://www.php.net/dir)
Posted 19 August 2006 - 04:45 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users