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
Use PaaS service to host your web - with pagodabox
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
LucienLee
December 04, 2013
Programming
86
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Use PaaS service to host your web - with pagodabox
Fundamental PHP & Web Development
LucienLee
December 04, 2013
More Decks by LucienLee
See All by LucienLee
SASS & Compass 101
lucienlee
1
310
final album
lucienlee
0
78
Simple Album
lucienlee
0
100
Accessing MySQL from PHP
lucienlee
1
380
DataBase and MySQL
lucienlee
1
240
PHP 101+1:function & form
lucienlee
1
300
PHP 101: flow control
lucienlee
0
330
Start to Build your Web
lucienlee
1
440
既然如此,那我們來hack資本世界吧!
lucienlee
0
160
Other Decks in Programming
See All in Programming
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
120
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
190
Oxcを導入して開発体験が向上した話
yug1224
4
340
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.4k
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
8k
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.3k
Webフレームワークの ベンチマークについて
yusukebe
0
180
はてなアカウント基盤 State of the Union
cockscomb
1
720
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
140
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
280
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.5k
Featured
See All Featured
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
240
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
540
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
780
Ruling the World: When Life Gets Gamed
codingconduct
0
260
Google's AI Overviews - The New Search
badams
0
1k
Building Adaptive Systems
keathley
44
3.1k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
The Cost Of JavaScript in 2023
addyosmani
55
10k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
200
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Transcript
Use PaaS service to host your web - with pagodabox
Fundamental PHP & Web Development ! lecturer : Lucien Lee 李柏緯 Lecture 10
! Cloud Computing
Cloud Computing
None
Paas •Provide API to deploy your service •You don’t set
up a really remote environment. • Just use platform and set configuration. •Pay on demand
None
None
Basic outline 1. Register With Pagoda Box 2. Create Your
Application 3. Set Up Git 4. Create Your SSH Key 5. Deploy Your Code 6. Set Your Domain
Sign up
Create new app
None
? Git
Git
Why version control •Reversibility •Concurrency •History
Example
Git for Windows
Set Up SSH Keys 1. cd ~/.ssh 2. ssh-keygen -t
rsa -C "
[email protected]
" 3. cat ~/.ssh/id_rsa.pub 4. copy and paste
Paste to Pagoda Box Account Settings
There is a GUI method
There is a GUI method
There is a GUI method
There is a GUI method
Some commands your need
git init initial to use git
git remote add pagoda <remote address> SET REMOTE ADDRESS!
git push pagoda master DEPLOY!
Set environment configuring your app for Pagoda Box
BoxFile web1: name: albumapp shared_writable_dirs: [photo, thumbnail] php_date_timezone: Asia/Taipei php_extensions:
[mysql, gd] php_file_uploads: "1" db1: name: albumdb type: mysql
? How to connect DB
Environment variables $link = mysql_connect( $_SERVER['DB1_HOST'], $_SERVER['DB1_USER'], $_SERVER[‘DB1_PASS'] );
Simple Case create Table in php file
Copy sql and query $sql_album = "CREATE TABLE IF NOT
EXISTS `Album` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(128) NOT NULL, `Owner` varchar(32) NOT NULL, `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;"; ! mysql_query($sql_album);
Copy sql and query $sql_photo = "CREATE TABLE IF NOT
EXISTS `Photo` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(128) NOT NULL, `Filename` varchar(64) NOT NULL, `Comment` text, `AlbumID` int(11) DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=25 ;"; ! mysql_query($sql_photo);
Copy sql and query $sql_user ="CREATE TABLE IF NOT EXISTS
`User` ( `Account` varchar(32) NOT NULL, `Password` varchar(32) NOT NULL, `Name` varchar(32) NOT NULL, PRIMARY KEY (`Account`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"; ! mysql_query($sql_user);
HOW TO MANAGE DB •You can use phpmyadmin too •Connect
DB by tunnel.
… Go further, learn more
Security issue how to defense with cracker attack?
Use PDO to link DB Better way to connect DB
Try some Framework cakePHP, condeignIter, ZEND, YII…
Login with other sites Facebook, google, twitter…
Thank you guys!