I have seen code examples to send files to IE and they work great as long 
as the connection is not encrypted, but as soon as we switch to https, IE 
goes back to throwing the same errors.

Here is the code. If anyone has a clue how to get this to work over https 
with IE please let me know. A major project we are working on relies on MS 
being able to make a browser that works.


<?php
// sendfile.php
$file="word.doc";
header("Cache-control: private"); // work around for IE
header("Content-Type: application/octet-stream");
header("Content-Length: ".filesize($file));
header("Content-Disposition: attachment; filename=".$file);

$fp = fopen($file, 'r');
fpassthru($fp);
fclose($fp);
?>

The error message in IE is "Internet Explorer can not download 
'sendfile.php?rev=1'" from mydomain.com. Internet Explorer was not able to 
open this internet site... bla bla bla..."

This is the same error you get in IE if you try the above code without the 
header("Cache-control: private"); so obviously something about the 
encryption is causing IE problems.

work arounds anyone?
-- 
John Lange

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to