|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15550 Fgets don?t get a file line correctly
Submitted: 2002-02-14 05:45 UTC Modified: 2002-07-11 02:28 UTC
From: jomarca1 at eresmas dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.1.1 OS: W98
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.
Block user comment
Status: Assign to:
Bug Type:
From: jomarca1 at eresmas dot com
New email:
PHP Version: OS:


 [2002-02-14 05:45 UTC] jomarca1 at eresmas dot com
I programmed a function that gets lines from file.
$desc_fichero= fopen($fichero,"r");
	$correcto = $correcto & $desc_fichero;
	if($desc_fichero){/***  Si el fichero se abre correctamente   ******/
			$linea= fgets($desc_fichero,1000);
			$linea = trim($linea);
			if (!empty($linea)..........
In version 4.0.6 fgets took the file line as is(Whith all characters).In newer version 4.1.1.converts the diferent tabs to a one space.Example:
"Hi->->->How are you": 4.1.1= "Hi how are you" .
4.0.6:"Hi->->->How are you":


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-11 02:28 UTC]
Use 'fopen($fichero, "rb")' (binary mode)

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Oct 17 07:03:33 2021 UTC