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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jw at comcity dot de
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC