Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

02 変数・配列・定数・form

1,191 views

Published on

教材です。

Published in: Education
  • Login to see the comments

02 変数・配列・定数・form

  1. 1. PHP (2)! ! PHP PHP
  2. 2. PHP PHP <?php    ?> 1. Apache Web     PHP   2. PHP     ex.C:¥xampp¥htdocs   3. <html>   <head>   <title><?php  echo  “ PHP”;  ?></title>   PHP   </head>     <body>   ex.index.php   </body>   </html> 10.4.18 (C)
  3. 3. PHP <?php    ?> PHP   <?php   ?> echo     10.4.18 (C)
  4. 4. PHP   .php PHP    <?php  ?>    <?php  ?>     text/html   PHP Web 10.4.18 (C)
  5. 5. PHP 1.   ‘’ ”” k   2.     3.     4.     5.     6.NULL     10.4.18 (C)
  6. 6. $hoge  =  “fuga”; $ =       OK   10.4.18 (C)
  7. 7. $children  =  array(“ ”  ,  ” ”  ,  ” ”);       0     [] echo  $children[0];    //   echo  $children[1];    //   echo  $children[2];    //   echo  $children[3];  //undefined 10.4.18 (C)
  8. 8. => $evangelion  =  array(  “ ”  =>  “ ”,            ” ”  =>  “ ”,            ” ”  =>  “ ”);           [“ ”] echo  $evangelion[“ ”];  // 10.4.18 (C)
  9. 9. define(“HOGE”,“FUGA”); echo  HOGE;  //FUGA   $   DB   10.4.18 (C)
  10. 10. PHP Web         $_   $_POST,  $_GET,  $_SERVER,  $_FILE…   $GLOBALS       __FILE__,  __LINE___ 2   PHP_VERSION,  PHP_OS   M_PI,  M_SQRT2   10.4.18 (C)
  11. 11. GET POST PHP 10.4.18 (C)
  12. 12. if( ){   if( 1){    //    // 1    //    //   } }elseif( 2){    // 2    //   }else{   if( 1){    //    //    //    //   } }else{    //    //   } true false     10.4.18 (C)
  13. 13. true false 1. ==          ex.  “ ”  ==  “ ”      //true   !=        ex.    !=      //true   <,>     ,  ex.  100  <  101          //true   >=,  <=      ex.  5  >=  5        //true 2. is_int($hoge)    $hoge true false   10.4.18 (C)

×