Excel if小于某個數值如何寫公式 excel if條件判斷括號的用法
1243
2023-11-14
本文簡單講述了Smarty的模板變量輸出方法。分享給大家供大家參考,具體如下:
config.inc.php配置文件如下:
include_once('smarty/Smarty.class.php'); $smarty=new Smarty(); $smarty->config_dir="smarty/Config_File.class.php"; $smarty->caching=false; //是否開啟緩存 $smarty->template_dir="./templates"; //模板目錄 $smarty->compile_dir="./templates_c"; //編譯目錄 $smarty->cache_dir="./smarty_cache"; //緩存目錄 $smarty->left_delimiter="<{"; $smarty->right_delimiter="}>";
index.php文件如下:
include('./config.inc.php'); $title="php測試標題"; $content="smarty練習!"; $newstext[]=array("name"=>"php程序測試","date"=>"2015-08-01"); $newstext[]=array("name"=>"php視頻教程","date"=>"2015-08-02"); $newstext[]=array("name"=>"smarty學習","date"=>"2015-08-03"); $row=array("標題","姓名","年齡"); $smarty->assign("title",$title); $smarty->assign("row",$row);//一個數組傳遞多個值 $smarty->assign("shownewstext",$newstext);//二維數組傳遞多個值 $smarty->assign("content",$content); $smarty->display('index.htm');
運行結果如下:
測試數組:標題 | 姓名 | 年齡 -------------------------------------------------------------------------------- 測試內容為:smarty練習! 循環新聞內容為: php程序測試 - 2015-08-01 php視頻教程 - 2015-08-02 smarty學習 - 2015-08-03
希望本文所述對大家基于Smarty模板的php程序設計有一定幫助作用。
#免責聲明#
本站[綠夏技術導航]提供的一切軟件、教程和內容信息僅限用于學習和研究目的;不得將上述內容用于商業或者非法用途,否則,一切后果請用戶自負。本站信息來自網絡收集整理,版權爭議與本站無關。您必須在下載后的24個小時之內,從您的電腦或手機中徹底刪除上述內容。如果您喜歡該程序或內容,請支持正版,購買注冊,得到更好的正版服務。我們非常重視版權問題,如有侵權請郵件[admin@lxwl520.com]與我們聯系進行刪除處理。敬請諒解!