Thread: PHP Gurus
View Single Post
Old 07-15-2006, 09:09 AM  
duckduckgoose
Registered User
 
Industry Role:
Join Date: Mar 2006
Location: North Pole
Posts: 82
If I open a zip file when prompted by my browser during testing (rather than save it), it opens fine for me (using WinRAR as my archiver on my pc here). The same zip file also opens fine if I actually save it to disk when prompted by the browser. This is using Firefox v1.5.0.4. The code does not work properly at all for me in IE6, but rather gives a browser error after trying to send the page (whatever.php where your function is sitting) itself.

My guess is that your specific combination of headers used so as not to cache the file being downloaded are the problem for you. You're telling the browser not to cache a copy of the file, which is fine if you're saving it to disk locally. However, if you try and have the browser just open the file without having cached it, it will probably choke depending on browser behaviour. There are varying combinations of http headers you can use in your PHP scripts to avoid having files be cached on the local browser; some of them are browser specific (IE one way, most other browsers another way), so on past scripts i can remember doing a check for IE before sending appropriate headers for tools like yours.

Read through the PHP documentation on headers for more info :
http://ca3.php.net/header
__________________
rRhino.com ...social networking for book fans...
duckduckgoose is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote