读出数据,拼写字符串,重新写入$new = "this ia a test";
$data = $new . file_get_contents( "data.txt" );
$fp = fopen( "data.txt", "w");
fwrite( $fp, $data );
fclose( $fp );
$data = $new . file_get_contents( "data.txt" );
$fp = fopen( "data.txt", "w");
fwrite( $fp, $data );
fclose( $fp );
不能把以前的数据保留