#47936 [Opn->Bgs]: fgets() not reading spaces
| From: | scottmac@php.net | Date: | Thu, 09 Apr 2009 12:21:27 +0000 |
| Subject: | #47936 [Opn->Bgs]: fgets() not reading spaces | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-135689@lists.php.net to get a copy of this message | ||
ID: 47936
Updated by: scottmac@php.net
Reported By: vikrant dot mahajan at topsource dot co dot uk
-Status: Open
+Status: Bogus
Bug Type: Readline related
Operating System: XP
PHP Version: 5.2.9
New Comment:
View the source of the output, HTML collapses multiple spaces to a
single space.
Previous Comments:
------------------------------------------------------------------------
[2009-04-09 12:05:09] vikrant dot mahajan at topsource dot co dot uk
Description:
------------
When fgets() read text file line by line, it eliminate blank spaces if
line contains more than one space.
Reproduce code:
---------------
$handle = fopen($myfile, "r");
while (!feof($handle))
{
$getline = fgets($handle);
}
Expected result:
----------------
line1 one two 100
line2 12 190 99.20
Actual result:
--------------
line1 one two 100
line2 12 190 99.20
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47936&edit=1