Transcript
  • ,

    ?

    ,

    ,

    ,

    Mysql Database: , Mysql

  • Mysql. Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC

    Mysql XAMPP Apache Mysql

    XAMPP

    , install apache as service install mysql as service apache mysql

    Filezilla ,

    xampp

    http://www.oldapps.com/xampp.php?old_xampp=47http://www.oldapps.com/xampp.php?old_xampp=47

  • apache mysql

    ? , , (NETBEANS) .php ,phtml .phtml , , html , , html

    1 2 3 4 5 6 7

    , html php

  • ,

    , ,

    MySQL MySQL MySQL

    http://www.4shared.com/file/15FpL3hW/jdk-6u11-windows-i586-p.htmlhttp://www.4shared.com/file/15FpL3hW/jdk-6u11-windows-i586-p.htmlhttp://www.4shared.com/file/18Xvd1Ph/netbeans-65-ml-php-windows.htmlhttp://www.4shared.com/file/18Xvd1Ph/netbeans-65-ml-php-windows.htmlhttp://www.4shared.com/file/18Xvd1Ph/netbeans-65-ml-php-windows.html

  • XAMPP XAMPP Apache MySQL

    C XAMPP htdocs

    1 2 3 4 5 6 7 8 9 10 11 12 13

    Xampp htdocs sample.php

  • http://localhost/sample.php

    localhost htdocs

  • , , , URL URL address , page not found page unavailable

  • , %

    ( ) ? , , , ,

    ,

    1 2 3 4 5 6 7 8 9 10 11 12 13

    .php sample.php

    sample.php c xampp htdocs http://localhost/sample.php

    http://localhost/sample.php

  • , , , , ,

  • , (, ) ,

  • ";" echo "hello everybody"; echo , "" hello everybody , , echo , , , echo

    ,

  • "//" , 1 2 3 4 5 6 7 8 9 10 11 12 13

    //this is comment

    , "//" this is comment ,

    /* */ , 1 2 3 4 5 6 7 8 9

    /*this is comment the comment is running the comment is here too*/

  • 10 11 12 13 14 15 16 17

    echo "hello everybody"; ?>

    ?

    , , "$" , , ,

    $hel

    $skl

    $a

  • $

    kodu,modhu $ $kodu, $modhu

    $u ssl .

    "_" ,$asd_af

    , ,

    $v=123;

    v

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

    sample.php htdocs http://localhost/sample.php

    http://localhost/sample.php

  • , 1 2 3 4 5 6 7 8 9 10 11

    $b=123; $b 123. echo $b $b $b 123 echo $b 123

    , ,

    , / ""

    "hello world"

  • hello world ""

    $var="hello world";

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

    echo $var $var hello world $var="hello world";

    ) , xampp , mysql php , xampp

    ) , , c:/xampp/htdocs/ .php , http://localhost/ .php , , , syntax xampp mysql ,

    , , ? 1 2 3 4 5 6 7 8

  • 9 10 11 12 13 14 15 16 17

    $txt2="how are you all?"; echo $txt1.$txt2; ?>

    , echo $txt1.$txt2; $txt1 $txt2 "." echo

    , ""

    echo "txt1";

    txt1

    echo

    echo "hello world";

    , "" ""

    ,

    $txt . "hello world" . $txt

  • echo

    echo $txt . "hello world" . $txt;

    , strlen() strpos()

    strlen():

    ,, , "where are you?"

    strlen("where are you?")

    ( ? , )

    echo strlen("where are you?");

    strpos():

    strpos("where are you?","you");

    () , , "you" y

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

  • , , , ? , , , +,-,x,/,% , , $a+$b=1000; $a $b "+" + , + $a $b , $a , $b ,$a+$b 1000 "=" "="

  • ,,, + $x+$a x a - $x-$a $x $a * $x*$a $x , $a / $x/$a $x $a % $x%$a $x $a ++ $x++ $x 1 - - $x- - $x 1

    ?

    , 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

  • 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

    .php htdocs

    $rm=2; $rm "2" $ng=3; $ng "3"

    echo "the sum of ".$rm. " and ". $ng ." is"; the sum of 2 and 3 is

    echo "";

  • echo $rm+$ng; $rm+$ng, $rm $nm echo $rm+$ng

    echo $rm+$ng; echo "$rm+$ng";

    "" , "" "+"

    , , if , ? , $num , , " " , , , if...else

  • Else echo "the number is higher than 10000"; ?> , $num hello,well done,the number is $num Else echo "the number is higher than 10000"; (, $num , else ) the number is higher than 10000 , , ) ) ) ) ( ) if($num
  • Elseif($num>10000 && $num
  • array() $exl $exl

    []

    , $exl[0]

    $exl= array("red","blue","white","black");

    $exl[0]= "red";

    $exl[1]= "blue";

    $exl[2]="white";

    $exl[3]="black";

    if...else , switch

    , if...else switch switch ,

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

  • 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

    break; default : echo "all is well"; break; } ?>

    $food=bread; $food bread.

    switch($food) $food switch() switch() $food

    switch() {}

    1 2 3 4 5

    case "bread": echo "it is good for health"; break;

    1 $food="bread"

  • case "bread" switch($food) $food "bread" , it is good for health , $food=bread break; ( switch() ) case default case break 1 2 3 4 5

    default : echo "all is well"; break;

    , switch ,

    , , , , ,

    1 2 3 4 5 6 7 8 9 10 11 12 13

  • 14 15 16 17 18 19

    ?>

    ,

    $num=array("two","three","four"); $num "two","three","four" $num

    $num[0]= "two";

    $num[1]="three";

    $num[2]= "four";

    echo $num[0] . " and " . $num[0] . " make " . $num[2];

    echo "";

    echo "not " . $num[1]; $num[1] , "three"

    ,

  • ? ? ? ? , ? , associative array ? $ins=array("schoole"=>"1-10" , "college"=>"11-12" , "versity"=> "13-16"); $ins['school'] = "1-9"; $ins['college'] = "11-12" ; $ins['versity'] = "13-16" ; $ins $ins['school'] , $ins['college'] , $ins['versity'] o, 1, 2 , associative array $num=array("two","three","four"); "two","three","four" , ,, associative array ,, , 'school','college','versity'

    0,1,2 $ins=array("1-10" ,"11-12" , "13-16"); $ins[0] = "1-9"; $ins[1] = "11-12" ; $ins[2] = "13-16" ;

    , , associative array

    1 2 3 4 5 6 7 8

  • 9 10 11 12 13 14 15

    $xm=array("food"=> " rice " , "name"=> " choyon " , "wrk"=>"eat" ); echo $xm['name'] . $xm['wrk'] . $xm['food'] ; ?>

    1 $xm=array("food"=> " rice " , "name"=> " choyon " , "wrk"=>"eat" ); $xm array() array() "food"=> " rice " , $xm "food" "rice" " rice " , "name"=> " choyon " , "wrk"=>"eat" 1 echo $xm['name'] . $xm['wrk'] . $xm['food'] ; associative array.


Top Related