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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Mon Apr 29 21:01:30 2024 UTC