河汉清且浅,牵牛敦而纯
# 删除无意义的空行
$str = preg_replace("/\r/", "\n", $str);

#替换\n前面的空白字符为\n,然后把多个\n只留一个
$str = preg_replace("/\s+\n/", "\n", $str);
$str = preg_replace("/\t/"," ",$str); $str = preg_replace(array("'</head[^>]*?>.*?<'si",), array('</head><',), $str); echo $str; # "r"只读方式打开,指针指向文件头 $fp = fopen($fn, 'r'); $pos = 440;
# 把指针向后跳440字符 fseek($fp, $pos, SEEK_CUR);
# 读取当前行内容 $title = fgets($fp);

 

posted on 2022-05-17 11:45  伊索  阅读(75)  评论(0编辑  收藏  举报