ballouta Posted June 17, 2008 Share Posted June 17, 2008 Hi I downloaded a zip code that manages compressed file from :http://www.phpconcept.net I tested the function many times and everything was OK. After I completed my code (around 200 lines), the function is not working. (the code uses IMAP functions to look for new messages, then copy the compressed file, uncompresses it in a specific folder, then loop on files name and make some process) Note that somestimes when i give the function the zip file name like : 746549.zip it works, and when i give it the name as a variable it doesn't work e.g. $myf. Also note that it worked before using this variable, but i am very very disperate can't find the problem. the function is: require_once('pclzip.lib.php'); $archive = new PclZip("$myf"); if ($archive->extract(PCLZIP_OPT_PATH, "stk/temp/", PCLZIP_OPT_REMOVE_PATH, 'install/release') == 0) { die("Error : ".$archive->errorInfo(true)); } else echo "working! </br>"; the error: Error : PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature Please I need experts and genius helps! Thanks alot Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted June 17, 2008 Share Posted June 17, 2008 are you sure that the path to the file is correct? echo $myf to ensure that it is...double check any relative paths to be sure. Quote Link to comment Share on other sites More sharing options...
ballouta Posted June 17, 2008 Author Share Posted June 17, 2008 I echo $myf is it working and i can see the file name correctly. as for paths, at least the zip file is found in the same location of the fucntion code, so it doesn't need any path, although i might use later a path. so any help plz? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.