Jump to content

Big Problem: Function Not Working


ballouta

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.