<?php
/**
* @name after the collection of processing . PHP
* @date Sat Dec 02:07:45 CST 2007
* @copyright Mayong accounted for (Myz)
* @author Mayong accounted for (Myz)
* @link http://blog.111cn.net/mayongzhan/
*/
After the collection of documents And then take care of it. The things here Let me copy 5 books, which is inconvenient to provide, find it yourself.
Header (' Content-type:text/html;charset=utf8 ');
function writer ($content, $url)
{
$fp = fopen ($url, ' ab ');
fwrite ($fp, $content);
fclose ($FP);
}
From 1 to 136 pages of content are merged once. This is the best ...
For ($i =1 $i <136; $i + +) {
$str = file_get_contents ('./myz/'. $i '. shtml ');
Preg_match ("/(
$arr [6] = Preg_replace ("/(<span[^>]+>.*?<a[^>]+>) (. *?) (</a></span>)/S "," $ ", Preg_replace ("/<p>|</p>/"," RN ", $arr [6]));
$result = " RN------------------------------------------------RN------------------------------------------------RN------------------- -----------------------------rn ". $i." ----------------Directory number for Mayong : ". $arr [2]." RN------------------------------------------------RN------------------------------------------------RN------------------- -----------------------------RN ". $arr [6];
writer ($result, "./myz/all.txt");
}
?>