[dev] [solved] bad filesize
Joel Vandal
jvandal@subi.to
Wed, 10 Jul 2002 20:54:10 -0400
This is a multi-part message in MIME format.
---------------------- multipart/alternative attachment
Hi,
I resend my patch since I've discover other bug...
file isn't binary safe...
readfile directly output to stdout then cannot be used.
fopen allow to dump the content of the file in a string.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /repository/horde/lib/VFS/ftp.php,v
retrieving revision 1.7
diff -r1.7 ftp.php
65a66
>
67c68,71
< return implode('', file($tmpFile));
---
> $fd =3D fopen($tmpFile, "r");
> $content =3D fread($fd, filesize($tmpFile));
> fclose($fd) ;
> return $content ;
---------------------- multipart/alternative attachment
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I resend my patch since I've discover =
other=20
bug...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>file isn't binary safe...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>readfile directly output to stdout then =
cannot be=20
used.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>fopen allow to dump the content of the =
file in a=20
string.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial=20
size=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>RCS=20
file: /repository/horde/lib/VFS/ftp.php,v<BR>retrieving revision =
1.7<BR>diff=20
-r1.7 <A=20
href=3D"ftp://ftp.php">ftp.php</A><BR>65a66<BR>><BR>67c68,71<BR><&n=
bsp; =20
return implode('',=20
file($tmpFile));<BR>---<BR>> =
=20
$fd =3D fopen($tmpFile,=20
"r");<BR>> =
=20
$content =3D fread($fd,=20
filesize($tmpFile));<BR>> &nb=
sp; =20
fclose($fd)=20
;<BR>> &nbs=
p; =20
return $content ;<BR></DIV></FONT><FONT face=3DArial =
size=3D2></FONT></BODY></HTML>
---------------------- multipart/alternative attachment--