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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
MUSUBIXとは
nahisaho
0
130
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
940
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
Package Management Learnings from Homebrew
mikemcquaid
0
210
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
600
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
540
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
57
14k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Scaling GitHub
holman
464
140k
Claude Code のすすめ
schroneko
67
210k
The agentic SEO stack - context over prompts
schlessera
0
630
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
320
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
240
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
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