方便實用的PHP生成靜態(tài)頁面類(非smarty)第2/2頁
更新時間:2008年11月14日 12:25:17 作者:
不喜歡Smarty,直接寫了一個生成靜態(tài)的類,方便簡單實用,希望大家繼續(xù)完善。
復制代碼 代碼如下:
//------------------靜態(tài)生成----
$MyMake=new Makehtml;
$MyMake->MbUrl="News_Show.shtml";
$MyMake->Readfile();
$THTml=$MyMake->AllHtml;
$shuzu1=array();
$shuzu2=array();
$shuzu1[0]="<=\$keybord\$>";
$shuzu1[1]="<=\$description\$>";
$shuzu1[2]="<=\$title\$>";
$shuzu1[3]="<=\$Title1\$>";
$shuzu1[4]="<\$=Bid\$>";
$shuzu1[5]="<\$=Id\$>";
$shuzu1[6]="<=\$Contentb\$>";
$shuzu1[7]="<\$=BigId\$>";
$shuzu1[8]="<=\$Date\$>";
$shuzu1[9]="<=\$City\$>";
$shuzu1[10]="<=\$SmallId\$>";
$shuzu1[11]="<=\$CityId\$>";
$shuzu1[12]="width=\"100%\"";
$MyMake->OutUrl="News_show_1.shtml";
$shuzu2[0]="數(shù)組0";
$shuzu2[1]="數(shù)組1";
$shuzu2[2]="數(shù)組2";
$shuzu2[3]="數(shù)組3";
$shuzu2[4]="數(shù)組4";
$shuzu2[5]="數(shù)組5";
$shuzu2[6]="數(shù)組6";
$shuzu2[7]="數(shù)組7";
$shuzu2[8]="數(shù)組8";
$shuzu2[9]="數(shù)組9";
$shuzu2[10]="數(shù)組10";
$shuzu2[11]="數(shù)組11";
$shuzu2[12]="width=\"95%\"";
$MyMake->Replacehtml($shuzu1,$shuzu2);
$MyMake->SaveFile();
//------------------靜態(tài)生成完成-----------
相關(guān)文章
php使用ZipArchive函數(shù)實現(xiàn)文件的壓縮與解壓縮
這篇文章主要介紹了php使用ZipArchive函數(shù)實現(xiàn)文件的壓縮與解壓縮,需要的朋友可以參考下2015-10-10PHP+Javascript實現(xiàn)在線拍照功能實例
這篇文章主要介紹了PHP+Javascript實現(xiàn)在線拍照功能的方法,涉及javascript插件的使用及php圖片上傳的相關(guān)實現(xiàn)技巧,具有一定參考借鑒價值,需要的朋友可以參考下2015-07-07