Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PHP with Smarty
Search
HakumaNatata
October 20, 2009
Programming
40
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHP with Smarty
使用 Smarty 分開邏輯與版面
HakumaNatata
October 20, 2009
More Decks by HakumaNatata
See All by HakumaNatata
Introduction to NMAP
natata
0
66
SPDY
natata
0
120
How to trace code
natata
0
55
HTML5 canvas game
natata
0
78
Introduction to HTML5
natata
0
45
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
180
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
640
sbt 2.0: takeoff
eed3si9n
0
160
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
1k
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
590
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
すこし踏み込む CancellationToken
htkym
2
1.7k
APNsからLive Activityを開始する話
yumnumm
0
170
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
Domain-Driven Transformation
hschwentner
2
2.3k
Featured
See All Featured
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
930
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
480
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
600
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
450
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
540
Believing is Seeing
oripsolob
1
240
Skip the Path - Find Your Career Trail
mkilby
1
260
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
630
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Ruling the World: When Life Gets Gamed
codingconduct
0
400
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