Bug #51626 [Opn->Bgs]: Strange fputcsv reaction
| From: | felipe@php.net | Date: | Wed, 21 Apr 2010 14:28:32 +0000 |
| Subject: | Bug #51626 [Opn->Bgs]: Strange fputcsv reaction | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-149756@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51626&edit=1
ID: 51626
Updated by: felipe@php.net
Reported by: marhei at mac dot com
Summary: Strange fputcsv reaction
-Status: Open
+Status: Bogus
Type: Bug
Package: Filesystem function related
Operating System: Ubuntu 9.10
PHP Version: 5.3.2
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Read about the 'mode' parameter:
http://docs.php.net/manual/en/function.fopen.php
Previous Comments:
------------------------------------------------------------------------
[2010-04-21 15:45:42] marhei at mac dot com
Description:
------------
$handle = open('test.csv','r+');
fputcsv($handle,$content);
overwrite the last already in the file standing line.
If i write this, the last line is not overwritten:
$handle = open('test.csv','r+');
while($current = fgetcsv(handle)) {
//Nothing
}
fputcsv($handle,$content);
Test script:
---------------
//Does not work
$handle = open('test.csv','r+');
fputcsv($handle,$content);
//Work
$handle = open('test.csv','r+');
while($current = fgetcsv(handle)) {
//Nothing
}
fputcsv($handle,$content);
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51626&edit=1