smarty靜態(tài)實驗表明,網(wǎng)絡(luò)上是錯的~呵呵
更新時間:2006年11月25日 00:00:00 作者:
復制代碼 代碼如下:
<?
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實現(xiàn)單文件、多個單文件、多文件上傳函數(shù)的封裝示例
這篇文章主要介紹了PHP實現(xiàn)單文件、多個單文件、多文件上傳函數(shù)的封裝,結(jié)合實例形式詳細分析了php文件上傳的原理及針對文件上傳函數(shù)的封裝相關(guān)操作技巧,需要的朋友可以參考下2019-09-09php開發(fā)中的頁面跳轉(zhuǎn)方法總結(jié)
PHP頁面跳轉(zhuǎn)實現(xiàn)的功能就是將網(wǎng)站中一個網(wǎng)頁跳轉(zhuǎn)到另一個網(wǎng)頁中。對于剛剛學習PHP語言的朋友來說,是必須要掌握的基礎(chǔ)方法。2015-04-04php 遍歷顯示文件夾下所有目錄、所有文件的函數(shù),沒有分頁的代碼
一個簡單的目錄遞歸函數(shù) 第一種實現(xiàn)辦法:用dir返回對象 第二種實現(xiàn)辦法:用readdir()函數(shù)2008-11-11php產(chǎn)生隨機數(shù)的兩種方法實例代碼 輸出隨機IP
php產(chǎn)生隨機數(shù)的兩種方法實例代碼 輸出隨機IP,需要的朋友可以參考下。2011-04-04