smarty靜態(tài)實(shí)驗(yàn)表明,網(wǎng)絡(luò)上是錯(cuò)的~呵呵
更新時(shí)間:2006年11月25日 00:00:00 作者:
復(fù)制代碼 代碼如下:
<?
require_once("Smarty/libs/Smarty.class.php");
$smarty = new smarty();
$smarty->templates_dir="templates";
$smarty->templates_c_dir="templates_c";
$smarty->left_delimiter="<{";
$smarty->right_delimiter="}>";
$smarty->assign("title","你成功了");
$smarty->display("test.html");
$content=$smarty->fetch("test.html");
$fp=fopen("ok.html","w");
fwrite($fp,$content);
fclose($fp);
?>
require_once("Smarty/libs/Smarty.class.php");
$smarty = new smarty();
$smarty->templates_dir="templates";
$smarty->templates_c_dir="templates_c";
$smarty->left_delimiter="<{";
$smarty->right_delimiter="}>";
$smarty->assign("title","你成功了");
$smarty->display("test.html");
$content=$smarty->fetch("test.html");
$fp=fopen("ok.html","w");
fwrite($fp,$content);
fclose($fp);
?>
相關(guān)文章
PHP實(shí)現(xiàn)單文件、多個(gè)單文件、多文件上傳函數(shù)的封裝示例
這篇文章主要介紹了PHP實(shí)現(xiàn)單文件、多個(gè)單文件、多文件上傳函數(shù)的封裝,結(jié)合實(shí)例形式詳細(xì)分析了php文件上傳的原理及針對(duì)文件上傳函數(shù)的封裝相關(guān)操作技巧,需要的朋友可以參考下2019-09-09PHP session垃圾回收機(jī)制實(shí)例分析
這篇文章主要介紹了PHP session垃圾回收機(jī)制,簡(jiǎn)單分析了session垃圾回收機(jī)制的原理、配置及相關(guān)使用技巧,需要的朋友可以參考下2019-06-06php開(kāi)發(fā)中的頁(yè)面跳轉(zhuǎn)方法總結(jié)
PHP頁(yè)面跳轉(zhuǎn)實(shí)現(xiàn)的功能就是將網(wǎng)站中一個(gè)網(wǎng)頁(yè)跳轉(zhuǎn)到另一個(gè)網(wǎng)頁(yè)中。對(duì)于剛剛學(xué)習(xí)PHP語(yǔ)言的朋友來(lái)說(shuō),是必須要掌握的基礎(chǔ)方法。2015-04-04php 遍歷顯示文件夾下所有目錄、所有文件的函數(shù),沒(méi)有分頁(yè)的代碼
一個(gè)簡(jiǎn)單的目錄遞歸函數(shù) 第一種實(shí)現(xiàn)辦法:用dir返回對(duì)象 第二種實(shí)現(xiàn)辦法:用readdir()函數(shù)2008-11-11php產(chǎn)生隨機(jī)數(shù)的兩種方法實(shí)例代碼 輸出隨機(jī)IP
php產(chǎn)生隨機(jī)數(shù)的兩種方法實(shí)例代碼 輸出隨機(jī)IP,需要的朋友可以參考下。2011-04-04