Home > Backend Development > PHP Tutorial > php generated file_PHP tutorial

php generated file_PHP tutorial

WBOY
Release: 2016-07-21 15:57:28
Original
1107 people have browsed it

function rw_counterfile()
{
$fp=fopen("counter.txt","r+");
if($fp==NULL) echo "File processing error" ;
rewind($fp);//The pointer moves to the beginning of the file
fseek($fp, 2);//The pointer moves back 2
$point=ftell($fp);//
echo $point."
;";//
fputs($fp, xyxy, 2);//Write 2 characters
rewind($fp);//
$ num=fgets($fp,23);//Read the string
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 "File processing error"; rewind($fp);//The pointer moves to the beginning of the file fseek($fp,2);//The pointer moves backward 2 $point=ftell($...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template