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
Use PaaS service to host your web - with pagodabox
Search
LucienLee
December 04, 2013
Programming
88
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
320
final album
lucienlee
0
79
Simple Album
lucienlee
0
110
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
340
Start to Build your Web
lucienlee
1
440
既然如此,那我們來hack資本世界吧!
lucienlee
0
170
Other Decks in Programming
See All in Programming
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
600
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
570
カツオ、ご期待ください
suneo3476
0
140
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
110
すこし踏み込む CancellationToken
htkym
2
1.6k
Security issues being discussed on Web Platforms
petamoriken
0
1.4k
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
510
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
410
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.3k
GitHubハンズオン講座 — 実務レベルのチーム開発のフローを身につけよう
junhat6
0
120
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
390
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1.2k
Featured
See All Featured
Designing for Performance
lara
611
70k
The Curse of the Amulet
leimatthew05
3
15k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
290
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
500
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Amusing Abliteration
ianozsvald
1
320
Rails Girls Zürich Keynote
gr2m
96
14k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
960
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
350
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
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!