Reply to fpassthru(); corrupts files on win 5.0.4 ??

Your name:

Reply:


Posted by Andras Kende on 10/06/88 11:12

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);
?>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация