I posted this once under another subject, but didn't get any responses.  I'm
stuck on this, and could really use some help.

I have the following php code for downloading a file to the user via the
browser:

  // Open csv file.
  $fp = fopen("fileOnServer.csv", "r");

  // Set headers for csv download.
  header("Content-Type:application/csv");
  header("Content-Disposition:attachment; filename=downloadFile.csv");
  header("Content-Transfer-Encoding:binary");

  // Put it to the browser.
  fpassthru($fp);

This works great in Mozilla and IE 6 via http, and it works in Mozilla via
https, but for some reason in IE 6 via https, my filename
is mysteriously replaced by a truncated version of my page url.  This
results in an error, because the file (obviously) cannot be found to be
downloaded.

Is it something I'm doing, or is this an IE problem?  And if so, are there
any work-arounds?  I can get it working with a re-direct to the file after
saving it, but that means my server file and my download file have to have
the same name, which I would like to avoid.

Thanks in advance,

Geoff Thompson

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

Reply via email to