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
35
0
Share
PHP with Smarty
使用 Smarty 分開邏輯與版面
HakumaNatata
October 20, 2009
More Decks by HakumaNatata
See All by HakumaNatata
Introduction to NMAP
natata
0
60
SPDY
natata
0
110
How to trace code
natata
0
50
HTML5 canvas game
natata
0
70
Introduction to HTML5
natata
0
40
Other Decks in Programming
See All in Programming
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
180
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
130
Swiftのレキシカルスコープ管理
kntkymt
0
210
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
430
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
800
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
2k
Modding RubyKaigi for Myself
yui_knk
0
870
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
440
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
240
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
170
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.8k
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
570
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
530
Visualization
eitanlees
152
17k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
GraphQLとの向き合い方2022年版
quramy
50
15k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
600
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
140
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
190
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Optimizing for Happiness
mojombo
378
71k
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