<? function rw_counterfile() { $fp=fopen(“counter.txt”,”r+”); if($fp==NULL) echo “文件处理出错”; rewind($fp);//指针移到文件头 fseek($fp, 2);//指针向后移2 $point=ftell($fp);// echo $point.” ;”;// fputs($fp, xyxy, 2);//写入2个字符 rewind($fp);// $num=fgets($fp,23);//读出字符串 echo “get:”.$num.” ;”;// fclose($