ID: 15613
Updated by: [EMAIL PROTECTED]
-Summary: readfile doesn't work correctly with WIndows XP
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Feedback
Bug Type: Output Control
Operating System: Windows XP (Professional)
PHP Version: 4.1.1
New Comment:
You're not using the auto-fit image to window option
in IE 6 are you?
Previous Comments:
------------------------------------------------------------------------
[2002-02-19 03:11:00] [EMAIL PROTECTED]
I use a script like the following for downloading files (images, ascii,
...) :
<?
$link = $save_as_name = "test.tif"; // or *.bmp, *.txt, ...
$size = filesize($link);
header("Content-Type: application/octet-stream");
header("Content-disposition: inline; filename=\"".$save_as_name."\"");
header("Content-Length: $size");
header("Content-Transfer-Encoding: binary\n");
readfile($link); // or fpassthru instead of readfile
//$fp = fopen($link, "r");
//fpassthru($fp);
//fclose($fp);
?>
Under Win NT/2000 it works fine, but under XP i get a distorted image
after downloading and opening the file. Also text files differ from the
original one.
I use Apache 1.3.22 and PHP 4.1.1 as module.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15613&edit=1