I have this function whereby it allows people to download zip file but then i try to open it after downloading it, there was this error msg that says "Error reading zip".
starsunited
1
Light Poster
Recommended Answers
Jump to PostIf you really want help you should post your code, or at least the portion you feel is causing the problem. Offhand it sounds like the zip file on the server has gotten corrupted somehow.
Jump to PostHave you tried:
header("Content-type: application/x-zip");
Also, you open the file and put the data into $data. Then you use the class and use the variable $filedata. Should they be the same??
Jump to PostHi
You should be using a content length header so the browser does not add \r?\n to the stream buffer...
Also your application-x-type is wrong...
if ( strstr ( strtolower ( $_SERVER['HTTP_USER_AGENT'] ), 'msie 5.5' ) ) { $att = ''; } else { $att …
All 9 Replies
DanceInstructor
19
Posting Whiz
starsunited
1
Light Poster
DanceInstructor
19
Posting Whiz
starsunited
1
Light Poster
starsunited
1
Light Poster
demo
0
Newbie Poster
starsunited
1
Light Poster
starsunited
1
Light Poster
starsunited
1
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.