PHP笔记-Smarty模板引擎的使用
生活随笔
收集整理的這篇文章主要介紹了
PHP笔记-Smarty模板引擎的使用
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
進入官網下載4.0
將lib目錄拷貝到項目中:
新建2個文件一個
smarty.php:
<?phpinclude_once("smarty/Smarty.class.php");$smarty = new Smarty();$hello = "Hello World";$smarty->assign("hello", $hello);$smarty->display("smarty.html"); ?>smart.html:
<!DOCTYPE html> <html lang="en"> <head><meta charset="UTF-8"><title>Title</title> </head> <body>{$hello} </body> </html>總結
以上是生活随笔為你收集整理的PHP笔记-Smarty模板引擎的使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 计算机应用基础教程2015答案,《计算机
- 下一篇: 基于java的银行综合业务柜台系统设计与