Hi

I have problems with downloading files from my web application in php.
Here is the code from download.php

<?
if (isset($dload))
{
if ($dload=="cdrs") //
{
$filename="./dload_files/temp.txt";
// now create file, and load some data from mssql in it - it is ok
$fp=fopen($filename,"w");
write_data($fp);
fclose($fp);
}
$len=filesize($filename);
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
header("Content-type: application/download");
header("Content-Length: $len");
header("Content-Disposition: attachment; filename=\"$filename\"");
$fp=fopen($filename, "r");
fpassthru($fp);
exit;
}
?>

download.php is called from another page
I get the save as dialog box , but filename is not temp.txt but download
with no extension. I have heard this is bug in IE about content-disposition
headers.
Anyone can help here?

Radovan



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

Reply via email to