fpassthru(); corrupts files on win 5.0.4 ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

windows 2003 server iis6 with php 5.0.4 isapi...

The following code was working perfectly on 5.0.3
since 5.0.4 upgrade dowloaded files gets corrupted..

Any hint where the problem could be?


Thanks,
Andras Kende
http://www.kende.com/


<?php

$file = $_REQUEST['file'];
$company = $_REQUEST['company'];

$path = "\\\server\ftpserver\\$company\\" . $file;
$size = filesize($path);

header("Cache-Control: ");
header("Pragma: ");
header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=\"$file\"");
header("Content-transfer-encoding: binary");
header("Content-length: $size");

$fp=fopen($path, "rb");
fpassthru($fp);
fclose($fp);
?>

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux