Home > Article > Backend Development > http://www.12306.cn/mormhweb/ php generated file
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();
?>;
The above introduces the http://www.12306.cn/mormhweb/ php generated file, including the content of http://www.12306.cn/mormhweb/. I hope it will be helpful to friends who are interested in PHP tutorials.