<?php
$string="haha";
$target='<input type="button" value="submit" id="submitform">';
$handle = fopen("D:/wamp/www/liuyanban.html","a");
fseek($handle, -140,SEEK_END);
fwrite($handle, "ok");
fclose($handle);
?>
我想问,为什么我已经用fseek把文件指针改到倒数140个字节的地方,可是写入的时候,还是写在文件末尾的,如果这么做是错的,为什么?合理的思路是什么?
a和a+的模式打开,写入文件的任何数据都是加在后面,不会管文件指针的位置,文件指针只适合读取