Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: SSL, mime-types and downloading


Message #1 by Pat Malone <pmalone@c...> on Tue, 19 Jun 2001 09:38:15 +0100
I am trying to get a file to download instead of open and I amusing,

header("Content-Type: application/down-load");
header("Content-Disposition: attachment; filename=../docs/$item"); 
$fn=fopen("../docs/$item" , "r"); 
fpassthru($fn); 

This is on the basis that the browser will not recognise the
"down-load" type and not try to open the word document.

This works beautifully unless the script is in an SSL protected
directory.  What happens is that the header appears to have not been
re-written and the browser tries to download the script itself rather
than the file.

Any suggestions?



-- 
Best regards,
Pat
pmalone@c...                          



  Return to Index