SlideShare uma empresa Scribd logo
1 de 72
Baixar para ler offline
CakePHP2


 CakePHP Yusuke Ando (@yando)
          Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
by crabchick




CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
<?php
$keyword = '';
if (isset($_POST['keyword'])) {
       $keyword = $_POST['keyword'];
}


mysql_connect('localhost','user','password');
mysql_select_db('cakephp_sample');
mysql_query('set names utf8');
$sql = sprintf(
     "SELECT id,name,description FROM friends WHERE name LIKE '%s'",
     mysql_real_escape_string('%'.$keyword.'%')
);
$result = mysql_query($sql);
$data = array();
while ($row = mysql_fetch_assoc($result)) {
     $data[] = $row;
}
?>
<html>
<head><title>               </title></head>
<body>
<form action="list1.php" method="POST">
<input name="keyword"><input type="submit">
</form>
<ul>
<?php
foreach ($data as $row) {
       echo '<li>';
       echo $row['name'];
       echo $row['description'];
       echo '</li>';
}
?></ul>
</body></html>




         CakePHP                   Yusuke Ando (@yando)
<?php
$keyword = '';
if (isset($_POST['keyword'])) {
       $keyword = $_POST['keyword'];
}


mysql_connect('localhost','user','password');
mysql_select_db('cakephp_sample');
mysql_query('set names utf8');
$sql = sprintf(
     "SELECT id,name,description FROM friends WHERE name LIKE '%s'",
     mysql_real_escape_string('%'.$keyword.'%')
);
$result = mysql_query($sql);
$data = array();
while ($row = mysql_fetch_assoc($result)) {
     $data[] = $row;
}
?>
<html>
<head><title>               </title></head>
<body>
<form action="list1.php" method="POST">
<input name="keyword"><input type="submit">
</form>
<ul>
<?php
foreach ($data as $row) {
       echo '<li>';
       echo $row['name'];
       echo $row['description'];
       echo '</li>';
}
?></ul>
</body></html>




         CakePHP                   Yusuke Ando (@yando)
<?php
                                               //model.php
                                               mysql_connect('localhost','user','password');
                                               mysql_select_db('cakephp_sample');
                                               mysql_query('set names utf8');
                                               $sql = sprintf(
                                                    "SELECT id,name,description FROM friends WHERE name LIKE '%s'",
                                                    mysql_real_escape_string('%'.$keyword.'%')
                                               );
                                               $result = mysql_query($sql);
                                               $data = array();
                                               while ($row = mysql_fetch_assoc($result)) {
<?php
                                                    $data[] = $row;
//index.php
                                               }
$keyword = '';
if (isset($_POST['keyword'])) {
    $keyword = $_POST['keyword'];
}

                                               <!-- view.php -->
include ‘model.php’;                           <html>
include ‘view.php’;                            <head><title>               </title></head>
                                               <body>
                                               <form action="list1.php" method="POST">
                                               <input name="keyword"><input type="submit">
                                               </form>
                                               <ul>
                                               <?php
                                               foreach ($data as $row) {
                                                      echo '<li>';
                                                      echo $row['name'];
                                                      echo $row['description'];
                                                      echo '</li>';
                                               }
                                               ?></ul>
                                               </body></html>




                                    CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
/**
  * To configure CakePHP *not* to use mod_rewrite and to
  * use CakePHP pretty URLs, remove these .htaccess
  * files:
  *
  * /.htaccess
  * /app/.htaccess
  * /app/webroot/.htaccess
  *
  * And uncomment the App.baseUrl below:
  */
	     //Configure::write('App.baseUrl', env('SCRIPT_NAME'));




                CakePHP       Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)

Mais conteúdo relacionado

Mais procurados

News of the Symfony2 World
News of the Symfony2 WorldNews of the Symfony2 World
News of the Symfony2 World
Fabien Potencier
 
The state of Symfony2 - SymfonyDay 2010
The state of Symfony2 - SymfonyDay 2010The state of Symfony2 - SymfonyDay 2010
The state of Symfony2 - SymfonyDay 2010
Fabien Potencier
 
international PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secretsinternational PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secrets
smueller_sandsmedia
 

Mais procurados (20)

News of the Symfony2 World
News of the Symfony2 WorldNews of the Symfony2 World
News of the Symfony2 World
 
[PL] Jak nie zostać "programistą" PHP?
[PL] Jak nie zostać "programistą" PHP?[PL] Jak nie zostać "programistą" PHP?
[PL] Jak nie zostać "programistą" PHP?
 
PHPUnit でよりよくテストを書くために
PHPUnit でよりよくテストを書くためにPHPUnit でよりよくテストを書くために
PHPUnit でよりよくテストを書くために
 
The Perl6 Type System
The Perl6 Type SystemThe Perl6 Type System
The Perl6 Type System
 
Perl6 grammars
Perl6 grammarsPerl6 grammars
Perl6 grammars
 
The state of Symfony2 - SymfonyDay 2010
The state of Symfony2 - SymfonyDay 2010The state of Symfony2 - SymfonyDay 2010
The state of Symfony2 - SymfonyDay 2010
 
Php
PhpPhp
Php
 
Current state-of-php
Current state-of-phpCurrent state-of-php
Current state-of-php
 
Extbase and Beyond
Extbase and BeyondExtbase and Beyond
Extbase and Beyond
 
Php unit the-mostunknownparts
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownparts
 
PHP Tips & Tricks
PHP Tips & TricksPHP Tips & Tricks
PHP Tips & Tricks
 
Get into the FLOW with Extbase
Get into the FLOW with ExtbaseGet into the FLOW with Extbase
Get into the FLOW with Extbase
 
The most exciting features of PHP 7.1
The most exciting features of PHP 7.1The most exciting features of PHP 7.1
The most exciting features of PHP 7.1
 
international PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secretsinternational PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secrets
 
Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)
 
Php array
Php arrayPhp array
Php array
 
Learning Perl 6
Learning Perl 6 Learning Perl 6
Learning Perl 6
 
Arrays in PHP
Arrays in PHPArrays in PHP
Arrays in PHP
 
20160227 Granma
20160227 Granma20160227 Granma
20160227 Granma
 
Advanced modulinos trial
Advanced modulinos trialAdvanced modulinos trial
Advanced modulinos trial
 

Semelhante a 8時間耐久CakePHP2 勉強会

C A S Sample Php
C A S Sample PhpC A S Sample Php
C A S Sample Php
JH Lee
 
R57shell
R57shellR57shell
R57shell
ady36
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked about
Tatsuhiko Miyagawa
 
Topological indices (t is) of the graphs to seek qsar models of proteins com...
Topological indices (t is) of the graphs  to seek qsar models of proteins com...Topological indices (t is) of the graphs  to seek qsar models of proteins com...
Topological indices (t is) of the graphs to seek qsar models of proteins com...
Jitendra Kumar Gupta
 

Semelhante a 8時間耐久CakePHP2 勉強会 (20)

C A S Sample Php
C A S Sample PhpC A S Sample Php
C A S Sample Php
 
Pemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionPemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan Session
 
London XQuery Meetup: Querying the World (Web Scraping)
London XQuery Meetup: Querying the World (Web Scraping)London XQuery Meetup: Querying the World (Web Scraping)
London XQuery Meetup: Querying the World (Web Scraping)
 
Drupal Development (Part 2)
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)
 
Advanced php testing in action
Advanced php testing in actionAdvanced php testing in action
Advanced php testing in action
 
The History of PHPersistence
The History of PHPersistenceThe History of PHPersistence
The History of PHPersistence
 
Php (1)
Php (1)Php (1)
Php (1)
 
Presentation1
Presentation1Presentation1
Presentation1
 
logic321
logic321logic321
logic321
 
Blog Hacks 2011
Blog Hacks 2011Blog Hacks 2011
Blog Hacks 2011
 
Php 101: PDO
Php 101: PDOPhp 101: PDO
Php 101: PDO
 
Oops in php
Oops in phpOops in php
Oops in php
 
Shell.php
Shell.phpShell.php
Shell.php
 
php plus mysql
php plus mysqlphp plus mysql
php plus mysql
 
R57shell
R57shellR57shell
R57shell
 
Intermediate PHP
Intermediate PHPIntermediate PHP
Intermediate PHP
 
Php update and delet operation
Php update and delet operationPhp update and delet operation
Php update and delet operation
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked about
 
Topological indices (t is) of the graphs to seek qsar models of proteins com...
Topological indices (t is) of the graphs  to seek qsar models of proteins com...Topological indices (t is) of the graphs  to seek qsar models of proteins com...
Topological indices (t is) of the graphs to seek qsar models of proteins com...
 
Why Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary ThingWhy Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary Thing
 

Mais de Yusuke Ando

DevOpsを実現する為のChef実践テクニック Chef12対応版
DevOpsを実現する為のChef実践テクニック Chef12対応版DevOpsを実現する為のChef実践テクニック Chef12対応版
DevOpsを実現する為のChef実践テクニック Chef12対応版
Yusuke Ando
 
Testing your app with Selenium on Travis CI
Testing your app with Selenium on Travis CITesting your app with Selenium on Travis CI
Testing your app with Selenium on Travis CI
Yusuke Ando
 
Travis CIで実現するPHPアプリの自動テスト
Travis CIで実現するPHPアプリの自動テストTravis CIで実現するPHPアプリの自動テスト
Travis CIで実現するPHPアプリの自動テスト
Yusuke Ando
 
Shimokita.Unity Detonatorで爆発
Shimokita.Unity Detonatorで爆発Shimokita.Unity Detonatorで爆発
Shimokita.Unity Detonatorで爆発
Yusuke Ando
 
Shimokita.Unity RigidbodyとColliderで衝突
Shimokita.Unity RigidbodyとColliderで衝突Shimokita.Unity RigidbodyとColliderで衝突
Shimokita.Unity RigidbodyとColliderで衝突
Yusuke Ando
 
Webプログラマの為のUnity入門
Webプログラマの為のUnity入門Webプログラマの為のUnity入門
Webプログラマの為のUnity入門
Yusuke Ando
 
ゴールデンウィークに最適な学習コンテンツ
ゴールデンウィークに最適な学習コンテンツゴールデンウィークに最適な学習コンテンツ
ゴールデンウィークに最適な学習コンテンツ
Yusuke Ando
 
Travis CIですぐに始める継続的インテグレーション
Travis CIですぐに始める継続的インテグレーションTravis CIですぐに始める継続的インテグレーション
Travis CIですぐに始める継続的インテグレーション
Yusuke Ando
 
ブログやサイトのJekyllへの移行
ブログやサイトのJekyllへの移行ブログやサイトのJekyllへの移行
ブログやサイトのJekyllへの移行
Yusuke Ando
 
PHPとTravis CIでブラウザテスト
PHPとTravis CIでブラウザテストPHPとTravis CIでブラウザテスト
PHPとTravis CIでブラウザテスト
Yusuke Ando
 
Shimokita.Unity パリの街をユニティちゃんが駆ける
Shimokita.Unity パリの街をユニティちゃんが駆けるShimokita.Unity パリの街をユニティちゃんが駆ける
Shimokita.Unity パリの街をユニティちゃんが駆ける
Yusuke Ando
 
最近のCandyCane - PHP版Redmineでタスク管理を始めよう
最近のCandyCane - PHP版Redmineでタスク管理を始めよう最近のCandyCane - PHP版Redmineでタスク管理を始めよう
最近のCandyCane - PHP版Redmineでタスク管理を始めよう
Yusuke Ando
 

Mais de Yusuke Ando (20)

ダイナミック広告の改善と拡大
ダイナミック広告の改善と拡大ダイナミック広告の改善と拡大
ダイナミック広告の改善と拡大
 
DevOpsを実現するChef活用テクニック
DevOpsを実現するChef活用テクニックDevOpsを実現するChef活用テクニック
DevOpsを実現するChef活用テクニック
 
DevOpsを実現する為のChef実践テクニック Chef12対応版
DevOpsを実現する為のChef実践テクニック Chef12対応版DevOpsを実現する為のChef実践テクニック Chef12対応版
DevOpsを実現する為のChef実践テクニック Chef12対応版
 
Testing your app with Selenium on Travis CI
Testing your app with Selenium on Travis CITesting your app with Selenium on Travis CI
Testing your app with Selenium on Travis CI
 
Travis CIで実現するPHPアプリの自動テスト
Travis CIで実現するPHPアプリの自動テストTravis CIで実現するPHPアプリの自動テスト
Travis CIで実現するPHPアプリの自動テスト
 
Shimokita.Unity Detonatorで爆発
Shimokita.Unity Detonatorで爆発Shimokita.Unity Detonatorで爆発
Shimokita.Unity Detonatorで爆発
 
Shimokita.Unity RigidbodyとColliderで衝突
Shimokita.Unity RigidbodyとColliderで衝突Shimokita.Unity RigidbodyとColliderで衝突
Shimokita.Unity RigidbodyとColliderで衝突
 
Webプログラマの為のUnity入門
Webプログラマの為のUnity入門Webプログラマの為のUnity入門
Webプログラマの為のUnity入門
 
ゴールデンウィークに最適な学習コンテンツ
ゴールデンウィークに最適な学習コンテンツゴールデンウィークに最適な学習コンテンツ
ゴールデンウィークに最適な学習コンテンツ
 
Travis CIですぐに始める継続的インテグレーション
Travis CIですぐに始める継続的インテグレーションTravis CIですぐに始める継続的インテグレーション
Travis CIですぐに始める継続的インテグレーション
 
ブログやサイトのJekyllへの移行
ブログやサイトのJekyllへの移行ブログやサイトのJekyllへの移行
ブログやサイトのJekyllへの移行
 
PHPとTravis CIでブラウザテスト
PHPとTravis CIでブラウザテストPHPとTravis CIでブラウザテスト
PHPとTravis CIでブラウザテスト
 
Shimokita.Unity パリの街をユニティちゃんが駆ける
Shimokita.Unity パリの街をユニティちゃんが駆けるShimokita.Unity パリの街をユニティちゃんが駆ける
Shimokita.Unity パリの街をユニティちゃんが駆ける
 
Dev opschef
Dev opschefDev opschef
Dev opschef
 
Paa s and oss
Paa s and ossPaa s and oss
Paa s and oss
 
New relic
New relicNew relic
New relic
 
Engine Yardで作る NetCommons3のクラウド環境
Engine Yardで作る NetCommons3のクラウド環境Engine Yardで作る NetCommons3のクラウド環境
Engine Yardで作る NetCommons3のクラウド環境
 
Engine Yard Cloud
Engine Yard CloudEngine Yard Cloud
Engine Yard Cloud
 
最近のCandyCane - PHP版Redmineでタスク管理を始めよう
最近のCandyCane - PHP版Redmineでタスク管理を始めよう最近のCandyCane - PHP版Redmineでタスク管理を始めよう
最近のCandyCane - PHP版Redmineでタスク管理を始めよう
 
PHPの教室「foreachを極める」
PHPの教室「foreachを極める」PHPの教室「foreachを極める」
PHPの教室「foreachを極める」
 

Último

Último (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

8時間耐久CakePHP2 勉強会

  • 1. CakePHP2 CakePHP Yusuke Ando (@yando) Yusuke Ando (@yando)
  • 2. CakePHP Yusuke Ando (@yando)
  • 3. CakePHP Yusuke Ando (@yando)
  • 4. CakePHP Yusuke Ando (@yando)
  • 5. by crabchick CakePHP Yusuke Ando (@yando)
  • 6. CakePHP Yusuke Ando (@yando)
  • 7. CakePHP Yusuke Ando (@yando)
  • 8. CakePHP Yusuke Ando (@yando)
  • 9. CakePHP Yusuke Ando (@yando)
  • 10. CakePHP Yusuke Ando (@yando)
  • 11. <?php $keyword = ''; if (isset($_POST['keyword'])) { $keyword = $_POST['keyword']; } mysql_connect('localhost','user','password'); mysql_select_db('cakephp_sample'); mysql_query('set names utf8'); $sql = sprintf( "SELECT id,name,description FROM friends WHERE name LIKE '%s'", mysql_real_escape_string('%'.$keyword.'%') ); $result = mysql_query($sql); $data = array(); while ($row = mysql_fetch_assoc($result)) { $data[] = $row; } ?> <html> <head><title> </title></head> <body> <form action="list1.php" method="POST"> <input name="keyword"><input type="submit"> </form> <ul> <?php foreach ($data as $row) { echo '<li>'; echo $row['name']; echo $row['description']; echo '</li>'; } ?></ul> </body></html> CakePHP Yusuke Ando (@yando)
  • 12. <?php $keyword = ''; if (isset($_POST['keyword'])) { $keyword = $_POST['keyword']; } mysql_connect('localhost','user','password'); mysql_select_db('cakephp_sample'); mysql_query('set names utf8'); $sql = sprintf( "SELECT id,name,description FROM friends WHERE name LIKE '%s'", mysql_real_escape_string('%'.$keyword.'%') ); $result = mysql_query($sql); $data = array(); while ($row = mysql_fetch_assoc($result)) { $data[] = $row; } ?> <html> <head><title> </title></head> <body> <form action="list1.php" method="POST"> <input name="keyword"><input type="submit"> </form> <ul> <?php foreach ($data as $row) { echo '<li>'; echo $row['name']; echo $row['description']; echo '</li>'; } ?></ul> </body></html> CakePHP Yusuke Ando (@yando)
  • 13. <?php //model.php mysql_connect('localhost','user','password'); mysql_select_db('cakephp_sample'); mysql_query('set names utf8'); $sql = sprintf( "SELECT id,name,description FROM friends WHERE name LIKE '%s'", mysql_real_escape_string('%'.$keyword.'%') ); $result = mysql_query($sql); $data = array(); while ($row = mysql_fetch_assoc($result)) { <?php $data[] = $row; //index.php } $keyword = ''; if (isset($_POST['keyword'])) { $keyword = $_POST['keyword']; } <!-- view.php --> include ‘model.php’; <html> include ‘view.php’; <head><title> </title></head> <body> <form action="list1.php" method="POST"> <input name="keyword"><input type="submit"> </form> <ul> <?php foreach ($data as $row) { echo '<li>'; echo $row['name']; echo $row['description']; echo '</li>'; } ?></ul> </body></html> CakePHP Yusuke Ando (@yando)
  • 14. CakePHP Yusuke Ando (@yando)
  • 15. CakePHP Yusuke Ando (@yando)
  • 16. CakePHP Yusuke Ando (@yando)
  • 17. CakePHP Yusuke Ando (@yando)
  • 18. CakePHP Yusuke Ando (@yando)
  • 19. CakePHP Yusuke Ando (@yando)
  • 20. CakePHP Yusuke Ando (@yando)
  • 21. /** * To configure CakePHP *not* to use mod_rewrite and to * use CakePHP pretty URLs, remove these .htaccess * files: * * /.htaccess * /app/.htaccess * /app/webroot/.htaccess * * And uncomment the App.baseUrl below: */ //Configure::write('App.baseUrl', env('SCRIPT_NAME')); CakePHP Yusuke Ando (@yando)
  • 22. CakePHP Yusuke Ando (@yando)
  • 23. CakePHP Yusuke Ando (@yando)
  • 24. CakePHP Yusuke Ando (@yando)
  • 25. CakePHP Yusuke Ando (@yando)
  • 26. CakePHP Yusuke Ando (@yando)
  • 27. CakePHP Yusuke Ando (@yando)
  • 28. CakePHP Yusuke Ando (@yando)
  • 29. CakePHP Yusuke Ando (@yando)
  • 30. CakePHP Yusuke Ando (@yando)
  • 31. CakePHP Yusuke Ando (@yando)
  • 32. CakePHP Yusuke Ando (@yando)
  • 33. CakePHP Yusuke Ando (@yando)
  • 34. CakePHP Yusuke Ando (@yando)
  • 35. CakePHP Yusuke Ando (@yando)
  • 36. CakePHP Yusuke Ando (@yando)
  • 37. CakePHP Yusuke Ando (@yando)
  • 38. CakePHP Yusuke Ando (@yando)
  • 39. CakePHP Yusuke Ando (@yando)
  • 40. CakePHP Yusuke Ando (@yando)
  • 41. CakePHP Yusuke Ando (@yando)
  • 42. CakePHP Yusuke Ando (@yando)
  • 43. CakePHP Yusuke Ando (@yando)
  • 44. CakePHP Yusuke Ando (@yando)
  • 45. CakePHP Yusuke Ando (@yando)
  • 46. CakePHP Yusuke Ando (@yando)
  • 47. CakePHP Yusuke Ando (@yando)
  • 48. CakePHP Yusuke Ando (@yando)
  • 49. CakePHP Yusuke Ando (@yando)
  • 50. CakePHP Yusuke Ando (@yando)
  • 51. CakePHP Yusuke Ando (@yando)
  • 52. CakePHP Yusuke Ando (@yando)
  • 53. CakePHP Yusuke Ando (@yando)
  • 54. CakePHP Yusuke Ando (@yando)
  • 55. CakePHP Yusuke Ando (@yando)
  • 56. CakePHP Yusuke Ando (@yando)
  • 57. CakePHP Yusuke Ando (@yando)
  • 58. CakePHP Yusuke Ando (@yando)
  • 59. CakePHP Yusuke Ando (@yando)
  • 60. CakePHP Yusuke Ando (@yando)
  • 61. CakePHP Yusuke Ando (@yando)
  • 62. CakePHP Yusuke Ando (@yando)
  • 63. CakePHP Yusuke Ando (@yando)
  • 64. CakePHP Yusuke Ando (@yando)
  • 65. CakePHP Yusuke Ando (@yando)
  • 66. CakePHP Yusuke Ando (@yando)
  • 67. CakePHP Yusuke Ando (@yando)
  • 68. CakePHP Yusuke Ando (@yando)
  • 69. CakePHP Yusuke Ando (@yando)
  • 70. CakePHP Yusuke Ando (@yando)
  • 71. CakePHP Yusuke Ando (@yando)
  • 72. CakePHP Yusuke Ando (@yando)