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
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
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
AI巻き込み型コードレビューのススメ
nealle
1
150
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
710
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
610
CSC307 Lecture 09
javiergs
PRO
1
830
Patterns of Patterns
denyspoltorak
0
1.4k
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
110
高速開発のためのコード整理術
sutetotanuki
1
390
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
58k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
320
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
The untapped power of vector embeddings
frankvandijk
1
1.6k
The Limits of Empathy - UXLibs8
cassininazir
1
210
Navigating Weather and Climate Data
rabernat
0
100
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
430
The Cult of Friendly URLs
andyhume
79
6.8k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
49k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
51
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
84
A Modern Web Designer's Workflow
chriscoyier
698
190k
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