php生成文件_php基础
时间:2021-07-01 10:21:17
帮助过:5人阅读
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($fp);
}
rw_counterfile();
?>;