Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PHP with Smarty
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
HakumaNatata
October 20, 2009
Programming
0
35
PHP with Smarty
使用 Smarty 分開邏輯與版面
HakumaNatata
October 20, 2009
Tweet
Share
More Decks by HakumaNatata
See All by HakumaNatata
Introduction to NMAP
natata
0
59
SPDY
natata
0
110
How to trace code
natata
0
49
HTML5 canvas game
natata
0
69
Introduction to HTML5
natata
0
38
Other Decks in Programming
See All in Programming
CSC307 Lecture 04
javiergs
PRO
0
660
AI時代の認知負荷との向き合い方
optfit
0
150
SourceGeneratorのススメ
htkym
0
190
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
660
AtCoder Conference 2025
shindannin
0
1k
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
CSC307 Lecture 02
javiergs
PRO
1
770
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
Featured
See All Featured
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
63
Between Models and Reality
mayunak
1
180
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.5k
My Coaching Mixtape
mlcsv
0
46
Typedesign – Prime Four
hannesfritz
42
2.9k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
120
Game over? The fight for quality and originality in the time of robots
wayneb77
1
110
We Have a Design System, Now What?
morganepeng
54
8k
Visualization
eitanlees
150
17k
Facilitating Awesome Meetings
lara
57
6.7k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Transcript
資工二A 彭博涵
php http://www.study-area.org/coobila/ tutorial_502.html Hypertext Preprocessor 網頁程式的開發及能夠嵌入HTML文件之 中
當php遇上html 你中有我,我中有你 纏綿圖
糾纏不清的後果 少數人寫網頁 save 網頁開發團隊 dangerous!!
為了維護愛與和平 Smarty出現了
什麼是smarty? Wiki: smarty is a web template system written
in PHP. Smarty is primarily promoted as a tool for separation of concerns, which is a common design strategy for certain kinds of application
http://www.jaceju.net/blog/?cat=8&paged=2
安裝smarty函式庫 http://www.smarty.net/download.php 所需要的:libs 資料夾內的所有檔案 引入:require_once(‘資料夾路徑/ Smarty.class.php');
資料夾的規劃 Project template image .php template_c Lib CSS
第一個smarty化的網頁 demo
連續資料的處理 <{section name=i loop=$array}> <{$array[i]}> <{/section}>
demo1
一維陣列索引不為整數時 <{array.indexName}> demo2
二維陣列 <{section name=i loop=$array}> <{$array[i].indexName}> <{/section}>
精簡化 demo3
修飾變數 demo4
百家爭鳴 24個PHP樣板引擎 http://qa567.pixnet.net/blog/post/25365471
PHP說:我也是樣板引擎!
Smarty 官方網站 http://www.smarty.net/ 網站製作學習誌 http://www.jaceju.net/blog/?p=23
神魂顛倒資訊論壇 http://bbs.flash2u.com.tw/ dispbbs_54_66103.html