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
59
SPDY
natata
0
110
How to trace code
natata
0
49
HTML5 canvas game
natata
0
69
Introduction to HTML5
natata
0
39
Other Decks in Programming
See All in Programming
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
250
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
220
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
3
500
AI Assistants for YourAngular Solutions @Angular Graz, March 2026
manfredsteyer
PRO
0
150
20260315 AWSなんもわからん🥲
chiilog
2
190
The free-lunch guide to idea circularity
hollycummins
0
410
Coding as Prompting Since 2025
ragingwind
0
710
iOS機能開発のAI環境と起きた変化
ryunakayama
0
150
見せてもらおうか、 OpenSearchの性能とやらを!
shunta27
1
170
20260320登壇資料
pharct
0
160
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
150
一度始めたらやめられない開発効率向上術 / Findy あなたのdotfilesを教えて!
k0kubun
4
2.8k
Featured
See All Featured
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
990
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
GraphQLとの向き合い方2022年版
quramy
50
14k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
64
53k
A Soul's Torment
seathinner
5
2.6k
Deep Space Network (abreviated)
tonyrice
0
110
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.4k
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