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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
42 - 42 = ?
Subscribe to this entry?

 
 [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 20:01:30 2024 UTC