$tmpBody = "FJKA;FJSA; {page} batch generation divided into files and plus paging code ";
$TMPURL = ' www.111cn.net ';
$tmpUrlarray = Explode ('. ', $url);
$tmpArray = Explode (' {page} ', $tmpBody);
$total = count ($tmpArray);
if ($total >1)
{
$tmpStr = ';
for ($i =0; $i < $total; $i + +)//traverse all pagination
{
if ($i ==0)
{
$str. = "<a href=". $rs [' S_url ']. ' Class=bodypage target=_self> '. ($i + 1). ' </a> ';
}
Else
{
$str. = "<a href=". $rs [' id ']. ' _ '. $i. htm class=bodypage target=_self> '. ($i + 1). ' </a> ';
}
}
Batch generation into file and plus paging code
$str = ' <div class=mupage> '. $str. ' </div> ';
for ($j =0; $j < $total; $j + +)
{
if ($j ==0)
{
$fname = $rs [' id ']. HTM ';
}
Else
{
$fname = $rs [' id ']. ' _ '. $j. '. htm ';
}
$tempMu = Str_replace (' {htmlcontent} ', $tmpArray [$j]. $str, $tempLate);
Makehtml ($tempMu, $filePath, $fname); This function does not explain that a file creation code
}
$mupage = 1;
}
$tempLate = Str_replace (' {htmlcontent} ', $tmpBody, $tempLate); Ordinary articles are saved to an array regeneration page address by {page} paging, and then the HTM page is generated from the contents of the array based on explode, and the original site is reproduced with the source www.111cn.net
$total = 0;
$str = ';
$i = 0;
$j = 0;
/*
This code generation principle is id_ page number such as 100_1.htm,100_2.htm in the form of the first
*/
?>