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 Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or 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

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 15:01:30 2024 UTC