Edit report at http://bugs.php.net/bug.php?id=51626&edit=1

 ID:               51626
 Updated by:       [email protected]
 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

Reply via email to