I've looked at all the posts I could find in these forums about sending files using http headers, and loads tell of problems with IE.
I had to be different. Mine works in IE, but not in Netscape. In Netscape I get a @!#$ load of ASCII in the browser. At the end of the file I get the HTML I expected to see after the file download. Except that the html is in a strikeout font.
Much wierdness.
Anybody have any ideas how to make this work? (code below)
BTW, I tried it in NS6 and it crashed the browser!!
-- Nick
----------oOo----------
<pre>
$zipfilepath = $DOCUMENT_ROOT."/scm/test/zip/files.zip";
// create zip
exec("rm $DOCUMENT_ROOT/scm/test/zip/.zip");
exec("zip -j $zipfilepath $DOCUMENT_ROOT/scm/test/tmp/");
exec("rm $DOCUMENT_ROOT/scm/test/tmp/*");
$size = filesize($zipfilepath);
// send file
Header("Content_Type: application/octet-stream; filename=\"zip/files.zip\"");
Header("Content-Disposition: attachment; filename=\"files.zip\"");
Header("Content-Length: $size");
Header("Content-Transfer-Encoding: binary");
readfile($zipfilepath)
</pre>