[PHP] Test a zip file for validity
Hello all, How do I go about checking if a file is a zip file? Wrapping the zipinfo utility in php did not help since it does not return an exit code whether it succeeded or not. Thanks, IP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Test a zip file for validity
Ivo Pletikosic mailto:[EMAIL PROTECTED] on Friday, August 01, 2003 5:10 PM said: Wrapping the zipinfo utility in php did not help since it does not return an exit code whether it succeeded or not. Well if zipinfo returns anything at all it's probably valid. If it doesn't then it's probably not since it can't read the file properly. But then again I've never heard of the zipinfo utility so I could be totally wrong. Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Test a zip file for validity
* Thus wrote Ivo Pletikosic ([EMAIL PROTECTED]): Hello all, How do I go about checking if a file is a zip file? Wrapping the zipinfo utility in php did not help since it does not return an exit code whether it succeeded or not. I'm assuming the zipinfo your talking about is part of the unzip package. You should use unzip to test the files unzip -t file.zip will check the checksum for each file. 'man unzip' for further details. Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php