13
如何打开一个文本文件,并写入到它用PHP appendstyle如何打开文本文件并写入它追加样式与PHP?
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);
+ 1进行详细说明。 'fprintf()'也是一个不错的选择。 – 2010-03-15 17:03:41