How to open textfile and write to it append-style with php?

Posted by Chris_45 on Stack Overflow See other posts from Stack Overflow or by Chris_45
Published on 2010-03-15T16:52:06Z Indexed on 2010/03/15 16:59 UTC
Read the original article Hit count: 198

Filed under:
|
|

How do you open a textfile and write to it with php appendstyle

    textFile.txt

        //caught these variables
        $var1 = $_POST['string1'];
        $var2 = $_POST['string2'];
        $var3 = $_POST['string3'];

    $handle = fopen("textFile.txt", "w");
    fwrite = ("%s %s %s\n", $var1, $var2, $var3, handle);//not the way to append to textfile
fclose($handle);

© Stack Overflow or respective owner

Related posts about php

Related posts about write