Fwrite() adds the number of bytes written at the end of ouput
I am having a very frustrating problem. When I use fwrite() in my php code it always appends to number of characters it wrote to the file.

        function ecrireCsv(){
        $myFile = "example.csv";
        $fh = fopen($myFile, 'w') or die("can't open file");
        fwrite($fh,'asdasd');
        fclose($fh);
    }

Gives me this : asdasd6.

Can anyone explain this behavior to me?

Thank you.



Fwrite() adds the number of bytes written at the end of ouput
===

I am having a very frustrating problem. When I use fwrite() in my php code it always appends to number of characters it wrote to the file.

        function ecrireCsv(){
        $myFile = "example.csv";
        $fh = fopen($myFile, 'w') or die("can't open file");
        fwrite($fh,'asdasd');
        fclose($fh);
    }

Gives me this : asdasd6.

Can anyone explain this behavior to me?

Thank you.


