Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Zip archive 1

Status
Not open for further replies.

Itshim

Programmer
Apr 6, 2004
277
US
Greetings,

I am currently trying to open a zip file, but I keep getting the error message; Warning: Cannot open zip archive filename.zip in 'directory/path'.

I am using the ZZIPlib library and since I am not recieving the error; Fatal Error: Call to undefined function, I can only assume I installed the library correctly. I am running PHP on a Windows machine.

At this point I am just testing what I can do so my code is as basic as it can get.
Code:
if(file_exists('filename.zip')) {
    $ZipHandle = zip_open('filename.zip');
}
else {
    echo "Can not find file.";
}
I also know PHP can see the file because I am not getting the "Can not find file" message.

Any help is appreciated...

Thanks,
Itshim
 
DId you see this note in the PHP manual?
note: if you are using PHP in module mode, the open_zip function will need an absolute path to the file, because it is not aware of it's whereabouts. this is for win32 at least.
 
I'm sorry, I completely missed the note. Thank you for pointing it out, some times I think I'm blind. All is working well.

Thanks again,
Itshim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top