Hello,
I have some files on a website which the user can download (e.g. pdf,
zip...). The files sould not bw displayes but the browser should aks the
user what to do (e.g. save it to disk, open it). My code look like this:

header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=$userfile);
header("Content-Length: ".filesize($userfile));
header("Content-Transfer-Encoding: binary\n");

if($fp = fopen($userfile, "rb") fpassthru($fp);

This works fine in most browsers except Netscape 7.x. Here the file is saved
as "document.pdf.php" instead of "document.pdf". Does anyone know how to fix
this? Any help is appreciated.

Yours, Uli

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to