php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #327 fpassthru adds document length
Submitted: 1998-04-29 06:13 UTC Modified: 1998-04-29 09:55 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: jw at comcity dot de Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0 Latest CVS OS: Linux Kernel 2.033
Private report: No CVE-ID: None
 [1998-04-29 06:13 UTC] jw at comcity dot de
While using the fpassthru function
of php3, eg.

<?php
$fp = fopen( "test.html", "r" );
   echo (fpassthru($fp));
?>

the result will always display a number and the end of the output.
The length differs with the length of the document, so maybe it's the document length being displayed.

No php3.ini file.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-04-29 09:55 UTC] zeev
fpassthru() displays the contents of the file,
and returns the number of displayed bytes.  You should
just use fpassthru() alone.  If you echo it as well,
its result will be echo'd, which means you'll see the
number of bytes in the file after the file's contents.

 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Oct 04 00:01:25 2023 UTC