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
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
180
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
640
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
0
900
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
250
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2k
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
590
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
高速開発のためのコード整理術
sutetotanuki
1
390
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
420
Featured
See All Featured
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
120
GraphQLとの向き合い方2022年版
quramy
50
14k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
63
Side Projects
sachag
455
43k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
240
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
79
Discover your Explorer Soul
emna__ayadi
2
1.1k
Mind Mapping
helmedeiros
PRO
0
77
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
180
The untapped power of vector embeddings
frankvandijk
1
1.6k
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