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
LucienLee
December 04, 2013
Programming
84
0
Share
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
76
Simple Album
lucienlee
0
99
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
TSKaigi2026-静的解析への投資がAI時代のコード品質を支える ── カスタムESLintルールの設計と運用
hayatokudou
4
690
「OSSがあるなら自作するな」は AI時代も正しいか ── Build vs Adopt の新しい判断基準
kumorn5s
7
2.8k
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
470
2026年のソフトウェア開発を考える(2026/05版) / Software Engineering Scrum Fest Niigata 2026 Edition
twada
PRO
24
14k
開発体験を左右するライブラリの API 設計 - GraphQL スキーマ構築ライブラリから考える #tskaigi
izumin5210
2
270
ビジネスモデルから紐解く、AI+型駆動開発
hirokiomote
2
640
[BalkanRuby 2026] Drop your app/services!
palkan
3
610
Cloudflare で始める Data Platform
ta93abe
0
200
ECR拡張スキャンでSBOMを収集して サプライチェーン攻撃の影響調査を 爆速で終わらせてみた
akihisaikeda
1
170
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
460
cloudnative conference 2026 flyle
azihsoyn
1
200
Transactional Change Stream Processing With Debezium and Apache Flink
gunnarmorling
1
110
Featured
See All Featured
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.3k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
190
WCS-LA-2024
lcolladotor
0
600
Building AI with AI
inesmontani
PRO
1
1k
4 Signs Your Business is Dying
shpigford
187
22k
Amusing Abliteration
ianozsvald
1
170
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
150
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
410
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
350
It's Worth the Effort
3n
188
29k
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!