当前位置:Gxlcms > PHP教程 > php生成文件_PHP教程

php生成文件_PHP教程

时间:2021-07-01 10:21:17 帮助过:16人阅读

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();
?>;

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/317815.htmlTechArticle? functionrw_counterfile() { $fp=fopen("counter.txt","r+"); if($fp==NULL)echo"文件处理出错"; rewind($fp);//指针移到文件头 fseek($fp,2);//指针向后移2 $point=ftell($...

人气教程排行