网友原创的PHP模板类
<table style="BORDER-RIGHT: #cccccc 1px dotted; TABLE-LAYOUT: fixed; BORDER-TOP: #cccccc 1px dotted; BORDER-LEFT: #cccccc 1px dotted; BORDER-BOTTOM: #cccccc 1px dotted" cellspacing="0" cellpadding="6" width="95%" align="center" border="0">
<tr>
<td style="WORD-WRAP: break-word" bgcolor="#f3f3f3">
<font style="FONT-WEIGHT: bold; COLOR: #990000">以下是PHP源代码:</font><br><?php <br/> class Lightpage_Template { <br> <br> var $Tpl_Header; <br> var $Tpl_Footer; <br> var $Tpl_Parsing; <br> var $Tpl_Template; <br> var $Tpl_Dirname; <br> <br> var $Tpl_Parse_String; <br> var $Tpl_Parse_Array; <br> <br> var $Tpl_Result; <br> <br> function __construct() { <br> $this->Tpl_Header = NULL; <br> $this->Tpl_Footer = NULL; <br> $this->Tpl_Parsing = array(); <br> $this->Tpl_Template = ’list.html’; <br> $this->Tpl_ToParse = NULL; <br> <br> $this->Tpl_Parse_String = array(); <br> $this->Tpl_Parse_Array = array(); <br> <br> $this->Tpl_Result = NULL; <br> return true; <br> } <br> <br> function Parse_Template() { <br> $this->Tpl_Parse_String = array(); <br> $this->Tpl_Parse_Array = array(); <br> if($this->Tpl_Header!=NULL) { array_push($this->Tpl_Parse_String,$this->Tpl_Header);array_push($this->Tpl_Parse_Array,’{header}’); } <br> if($this->Tpl_Footer!=NULL) { array_push($this->Tpl_Parse_String,$this->Tpl_Footer);array_push($this->Tpl_Parse_Array,’{footer}’); } <br> if(count($this->Tpl_Parsing)!=1) { <br> foreach($this->Tpl_Parsing as $Tpl_Key => $Tpl_Value) { <br> array_push($this->Tpl_Parse_String,$Tpl_Value); <br> array_push($this->Tpl_Parse_Array,’{’.$Tpl_Key.’}’); <br> } <br> } <br> if($this->Tpl_Template!=NULL && $this->Tpl_ToParse==NULL) { <br> $this->Tpl_ToParse = file_get_contents(root.’./Templates/’.$this->Tpl_Template); <br> } <br> $this->Tpl_Result = str_replace($this->Tpl_Parse_Array,$this->Tpl_Parse_String,$this->Tpl_ToParse); <br> return $this->Tpl_Result; <br> } <br> <br> } <br>?> <br><br>用法: <br><br><br>$Mdl = new Lightpage_Template(); <br> $Mdl->Tpl_Header = ’zzz’; <br> $Mdl->Tpl_Footer = ’’; <br> $Mdl->Tpl_Parsing = ’’; <br> $Mdl->Tpl_Template = ’list.html’; <br> echo $Mdl->Parse_Template(); </td>
</tr>
</table>

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

MantisBT
Mantis是一個易於部署的基於Web的缺陷追蹤工具,用於幫助產品缺陷追蹤。它需要PHP、MySQL和一個Web伺服器。請查看我們的演示和託管服務。

記事本++7.3.1
好用且免費的程式碼編輯器

MinGW - Minimalist GNU for Windows
這個專案正在遷移到osdn.net/projects/mingw的過程中,你可以繼續在那裡關注我們。 MinGW:GNU編譯器集合(GCC)的本機Windows移植版本,可自由分發的導入函式庫和用於建置本機Windows應用程式的頭檔;包括對MSVC執行時間的擴展,以支援C99功能。 MinGW的所有軟體都可以在64位元Windows平台上運作。

PhpStorm Mac 版本
最新(2018.2.1 )專業的PHP整合開發工具

SublimeText3漢化版
中文版,非常好用