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.pdf
Search
mazua
March 31, 2021
22k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
初めてのPHP.pdf
mazua
March 31, 2021
More Decks by mazua
See All by mazua
refactoring
azuma
1
22k
Featured
See All Featured
Thoughts on Productivity
jonyablonski
76
5.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Designing Powerful Visuals for Engaging Learning
tmiket
1
540
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
350
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
230
Transcript
#RAKUSMeetup ©2020 RAKUS Co., Ltd. ©2020 RAKUS Co., Ltd. 『初めてのPHP』-
基礎と実務の橋渡しの1冊 - 株式会社ラクス 配配メール開発課 東純平
#RAKUSMeetup ©2020 RAKUS Co., Ltd. 今回ご紹介する書籍 •『初めてのPHP』(定価 ¥3000 +税)
#RAKUSMeetup ©2020 RAKUS Co., Ltd. こんな方におすすめ •実務が不安な新人エンジニア •新人に何を教えれば良いか不安な教育担当社員
#RAKUSMeetup ©2020 RAKUS Co., Ltd. 配属当時の自身の状況 •文系学部出身でプログラミングに不安 •実務にどのような知識が必要か見当もつかない (先輩社員に何を聞けばよいかも分からない)
#RAKUSMeetup ©2020 RAKUS Co., Ltd. 本書のおすすめポイント 1. 配列の解説が丁寧 2. ファイル処理を解説している
3. クッキー・セッションの解説が充実
#RAKUSMeetup ©2020 RAKUS Co., Ltd. 1. 配列の解説が丁寧 (1) (特にCやJavaをやってた人は)PHPの配列で困りがち Java
配列 ArrayList HashMap PHP 配列
#RAKUSMeetup ©2020 RAKUS Co., Ltd. 1. 配列の解説が丁寧 (2) $dinner =
array(‘Salad’, ‘Chicken’, ‘Corn Soup’); ⇒数値(インデックス)配列 $dinner = array(‘appetizer’ => ‘Salad’, ‘Main’ => ‘Chicken’, ‘Soup’ => ‘Corn Soup’); ⇒連想配列 数値配列にはPHP エンジンが自動的 に0,1,2とキーを割 り当てる
#RAKUSMeetup ©2020 RAKUS Co., Ltd. 2. ファイル処理を解説している(1) DB⇄アプリ⇄ファイルでデータを読み書き ⇒実務ではよく使うが、独学では中々学習できない DB
CSVファイル AP 難易度が高い& 必 要性を認識しづら い
#RAKUSMeetup ©2020 RAKUS Co., Ltd. 2. ファイル処理を解説している(2) •本書では1章丸々使ってPHPでのファイル処理を解説 $fh =
(‘dishes.txt’, ‘wb’); $q = $db->query(“SELECT dish_name, price FROM dishes”) while( $row = $q->fetch() ) { fwrite($fh, “The price of $row[0] is $row[1] ¥n”); } fclose($fh); ファイルの読み書きだけでなく ・ファイルの権限チェック ・エラー処理 など実装時に考慮すべき点も解説されている
#RAKUSMeetup ©2020 RAKUS Co., Ltd. 3. クッキー・セッションの解説が充実 (1) なんとなく意味は分かるけど… 何のために使う?
どうやって実装するの?
#RAKUSMeetup ©2020 RAKUS Co., Ltd. 3. クッキー・セッションの解説が充実(2) • セッションを使った処理の実装例 session_start();
if (isset($_SESSION[‘count’])) { $_SESSION[‘count’] += 1; } else { $_SESSON[‘count’] = 1; } print “You‘ve looked at this page ” . $_SESSION[‘count’] . “ times .”; 「デバッグでセッション変数 を不正な値に書き換えたらア プリがエラーを吐くことを確 認する」 みたいな作業をスムーズに進められた。
#RAKUSMeetup ©2020 RAKUS Co., Ltd. おわりに 『初めてのPHP』では「実務ではよく使うが、独 学での習得が難しい知識」を学習できる。 基礎から実践へ踏み出す支えになる一冊です