Bug #15613 Updated: readfile doesn't work correctly with WIndows XP
| From: | wez@php.net | Date: | Tue, 19 Feb 2002 09:53:42 +0000 |
| Subject: | Bug #15613 Updated: readfile doesn't work correctly with WIndows XP | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-552@lists.php.net to get a copy of this message | ||
ID: 15613
Updated by: wez@php.net
-Summary: readfile doesn't work correctly with WIndows XP
Reported By: khoukaz@web.de
-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] khoukaz@web.de
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