Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

ПрактикаWEB_2

.pdf
Скачиваний:
8
Добавлен:
09.02.2016
Размер:
356.18 Кб
Скачать

xx

x x z '

x z

zy

M T

P

H

H P P

y z x z yz z

xy z

x

H M L

-

RRRRRRRRRRRRRRR)((w ) pRRRRRRRqRRRRRRRRRRRRR,RRR

M LP T H

P H H LHTT_

L _ P THTT_

H P TP I

:

00

 

4

H HTT_L _INTERNET

c 888888888050103 n

o__________________

 

$

%

 

 

888888885(/+ +n

 

o________

 

$

%

 

 

( ,RRR (

$ B%

((

n

Interneto(

$ B%

(

RRRRRRRRRRRR RRRRRRRRRRRRRRRR,RR (

RRRRRRRRRRRRRRRRRRRRRRRRRRRRR (z(

 

 

n

Interneto.

 

 

 

 

 

n

 

Interneto

 

 

 

 

 

A DC'

 

 

'

 

'

 

 

N>;-

(

 

 

 

-

 

 

:

 

 

-

 

f_-

5

 

 

 

 

-

 

 

 

A DC$

' '

-

'

%5

 

 

 

 

 

-

 

 

 

NWTGAG5

-

 

 

DkHC5

 

 

 

 

-

 

 

WEB-

5

 

 

 

 

aa][W

(

 

 

 

 

 

 

 

 

(

 

 

 

 

+-

 

 

$ II)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c

 

 

 

(

 

 

 

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2

 

 

 

 

 

 

 

 

 

 

)

 

 

 

 

2

 

N>;

 

 

 

 

 

2

 

 

 

 

 

 

 

2

 

 

 

 

 

 

 

 

 

c

c

 

 

 

 

14

 

 

 

I

 

-

c

T

 

 

 

- T621

T

 

 

 

 

 

6 ( c

)

 

 

 

(

 

 

 

 

 

 

 

 

(

 

 

(

 

 

 

 

 

1.

 

 

 

 

 

 

2.

 

 

 

 

 

 

3.

 

 

 

 

 

 

4.

 

 

 

 

 

 

5.

 

 

 

 

 

 

 

:

 

 

 

 

 

1.

 

- pGAG

HgWdk

 

q'

',++ ' . (

2.

 

- p

 

q'

4

', + ',22 (

3.

 

'

 

web -

 

GAG Dkc ' - -

 

' ,

(

 

 

 

 

<?php

 

 

 

 

 

 

WUa

+0;

 

 

 

 

?>

 

 

 

 

 

 

 

 

 

 

GAG(x

 

 

 

' -

(

 

 

-

 

WUa'

 

-

 

 

$

 

%(

 

 

 

 

 

 

 

GAG

 

 

 

 

 

 

'

 

 

 

(

+

 

$

%

 

 

 

-

 

$

%

 

 

 

*

 

 

 

 

 

 

/

 

 

 

 

 

 

%

 

 

 

 

 

 

++

x

$

+%'

4

 

 

--

 

$

+%'

4

 

 

 

 

 

4

 

 

 

<?php

 

 

 

 

 

 

$num1 = 10;

 

 

 

 

 

$num2 = 7;

 

 

 

 

 

echo "\$num1 = ". $num1;

 

 

 

 

echo "<br/>\$num2 = ". $num2;

 

 

 

 

echo "<br/>\$num1 + \$num2 = ". ($num1 + $num2);

 

 

echo "<br/>\$num1 - \$num2 = ". ($num1 - $num2);

 

 

echo "<br/>\$num1 * \$num2 = ". $num1 * $num2;

 

 

echo "<br/>\$num1: \$num2 = ". $num1 / $num2;

 

 

echo "<br/>\$num1 % \$num2 = ". $num1 % $num2;

 

 

)

 

 

 

4

 

 

echo "<br/>++\$num1 = ". ++$num1;

 

 

 

//

$num1 = 11

 

 

 

 

g_+7+5)

 

 

 

 

 

)

 

 

 

4

 

 

echo "<br/>\$num1++ = ". $num1++;

//

$num1 = 11

$num1=10; )

)

4

echo "<br/>--\$num1 = ". --$num1;

 

$num1=10;

 

)

4

echo "<br/>\$num1-- = ". $num1--;

?>

4

 

 

 

4

 

u

$&&

 

%

'

 

'

 

 

 

u

 

$&&

%

'

 

 

(

 

 

 

4

 

 

 

<?php

 

 

 

 

)

 

4

 

 

$num1 = 10;

 

 

 

$num2 = 7;

 

 

 

dWl7&& g_+& g_,5)

 

+2

 

echo "<br/>\$rez = ". $rez;

 

 

 

)

g_+

 

4

 

$num1 = 10;

 

 

 

$rez = $num1++ & g_,5)

 

+1

 

echo "<br/>\$rez = ". $rez;

 

 

 

)

&& --

 

 

 

$str = "abc";

 

 

 

WUa 6Td)8(&&efd5)

 

STV

 

?>

 

'

 

4

u

g_+7 g_+& g_,-

 

5

u

g_+&7 g_,-

(

(

 

 

 

(

>

<

>=

<=

==

!=

===

!==

(w

' fdgW$ % +' SeW$ % (

GAG4

 

<?php

 

)

4

$num1 = 10;

 

$num2 = 7;

 

echo "\$num1 > \

g_,7 ($ g_+8

echo "\$num1 < \

g_,7 ($ g_+6

)

4

echo "<br/>10 < 7 = ". (10 < 7); // 0 echo "<br/>20 <= 19 = ". (20 <= 19); // 0 echo "<br/>1 == 1 = ". (1 == 1); // 1 echo "<br/>0 == \"\" = ". (0 == ""); // 1 echo "<br/>0 === 0 = ". (0 === 0); // 1

echo "<br/>0 === \"\" = ". (0 === ""); // 0 echo "<br/>true = ". true; // 1

echo "<br/>false = ". false; // 0 ?>

g_,%5)

+$+ 81-

%

g_,%5)

$+ 61-

%

 

4

 

 

 

 

 

+%

SeW'

'

 

 

 

 

,%

 

 

+

'

(

'

77

' 777

'

 

 

(

 

+(

GAG>jbWdf>V[fad'

 

 

4

 

<?php

 

 

 

 

 

 

WUa

 

+05

 

 

 

 

?>

 

 

 

 

 

 

 

 

[VWj(bb

 

 

 

 

 

 

 

fb4)aUS aef/.

 

 

 

,(

bb'

 

 

 

GAG

(

 

 

 

bb[ a$%5

 

 

 

(

 

 

 

 

'

 

 

(

 

 

 

 

 

.(

GAG

'

'

 

(

 

4 efd7

5 efd(7

5 WUa efd5

1.

GAG(

2.

(

 

 

17 (

c

)

 

 

(

 

 

1.

 

 

 

 

2.

 

 

 

 

3.

 

 

 

 

4.

 

 

 

 

5.

 

 

 

 

 

:

 

 

 

1.

- pGAG HgWdk

q'

',++ ' . (

2.

- p

q'

4

', + ',22 (

3.

'

web -

 

GAG Dkc ' - -

 

' , (

 

 

 

 

 

 

NWT-

 

 

A DC-

(

-

-

 

 

 

(

-

 

'-

 

 

 

(

 

 

 

 

<D '

 

 

 

-

(

 

 

 

 

 

+%

 

 

 

 

 

 

6ad_8 6)ad_8

 

(

6ad_8

 

4SUf[a _WfaV(z SUf[a

LIC

'

 

 

(z

_WfaV

'

A G

 

 

5

GF

> (

 

 

 

 

 

GF

>

 

(

>

 

 

 

'

A G-

'

 

GF

 

A G-

 

 

(

<form method="post" action="./admin/add_story.php">

 

 

 

</form>

 

 

 

 

 

2)

(checkbox)

 

 

 

 

 

checkbox

 

 

,

 

.

<input name="x'

" type="

" value="

">

 

 

 

 

 

<input>,

 

 

name

type(checkbox).

,

 

 

 

 

checked.

 

'

 

7

'

 

 

'

 

 

 

 

(

 

4

 

 

 

 

 

6[bgfS_W7_kUaadfkbW7UWU]Taj hSgW7dWV UWU]WV8

$

%

<input name="mycolor" type="checkbox" value="blue">

 

 

 

<input name="mycolor" type="checkbox" value="black">

 

 

 

<input name="mycolor" type="checkbox" value="white">

 

 

 

3)

(radio)

 

 

 

 

 

radio

 

 

,

 

 

.

 

 

 

 

 

 

<input name="x'

" type="

" value="

">

 

 

 

(radio)

name, type value. z

S_W

'fkbW

 

dSV[a'

hSgW

(

 

'

 

 

7

(

 

 

UWU]WV'

,

 

 

$

 

 

 

 

%

 

(

 

 

 

 

'

 

 

 

 

(

 

 

:

 

 

 

 

 

 

 

 

 

<input name="mycolor" type="radio" value="white">

 

 

 

 

<input name="mycolor " type="radio" value="green" checked>

(

 

)

<input name="mycolor " type="radio" value="blue">

 

 

 

 

<input name="mycolor " type="radio" value="red">

 

 

 

 

<input name="mycolor " type="radio" value="black">

 

 

 

 

4)

 

(Reset)

 

 

 

 

 

 

 

<input type=" " name="x'

" value="

 

">

 

 

 

 

 

 

 

$dWeWf%'

 

 

 

 

'

 

 

 

 

'

 

 

 

 

(

 

 

:

 

 

 

 

 

 

 

 

 

<input type="reset" name="Reset" value="

 

 

">

 

 

 

/%

 

$eWWUf%

 

 

 

 

 

 

 

 

6eWWUf8

 

 

 

 

'

 

 

 

 

 

(

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6eWWUf86)eWWUf8(

6abf[a86)abf[a8

 

 

'

 

hSgW

 

 

(

 

6abf[a8

eWWUfWV'

 

 

 

 

(

e[lW

'

 

 

(

e[lW

+'

 

 

 

(

 

 

_gf[bW'

 

 

 

 

$

e[lW7+

 

%(

 

 

 

<select name="x'

" size = "

" multiple>

 

 

 

 

6abf[a hSgW7

8

'

 

'

6)abf[a8

 

 

</select>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7

'

 

 

 

 

7

+" 7

,"

7

E(

 

0%

$fWjf%

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(

 

 

 

 

6[bgffkbW7

S_W7x

 

e[lW7

 

_SjW f7

(

 

8

 

 

 

 

 

 

 

e[lW

 

 

 

_SjW f

'

fkbW

 

 

fWjf(

 

 

hSgW'

 

hSgW-

(

 

 

 

 

 

'

 

 

(

 

 

 

 

 

 

 

 

 

 

:

 

 

 

 

 

 

 

 

 

<input type="text" name="txtName" size="10" maxlength="5" value="

 

">

1%

 

 

$bSeeiadV%

 

 

 

 

 

 

 

 

 

 

 

'

 

 

 

'

 

 

'

 

 

(

 

 

 

 

 

 

 

:

 

 

 

 

 

 

 

 

 

<input type="password" name="txtName" size="10" maxlength="5">

 

 

 

2%

 

 

 

$fWjfSdWS%

 

 

 

 

 

 

 

 

 

 

 

 

 

'

(

 

 

 

 

 

,

 

 

 

 

(

6fWjfSdWS S_W7x

Uae7

 

 

daie7

8

6)fWjfSdWS8

 

 

 

 

 

 

 

 

6fWjfSdWS86)fWjfSdWS8(

S_W

 

 

(

 

 

 

 

$Uae%

 

$daie%(

 

 

 

dWSVa k'

 

 

 

'

 

'

 

 

 

 

 

 

(

 

 

 

 

 

 

 

 

 

 

'

 

 

 

 

<textarea></textarea>.

 

4

 

 

 

 

 

 

 

6fWjfSdWS S_W7fjf:dWS Uae7+/ daie7+

dWSVa k8

'

 

 

 

 

 

 

'

 

dWSVa k

</textarea>

 

 

 

 

 

 

 

3%

 

 

 

 

 

 

 

 

 

 

 

'

(

 

<input name="x' " type=" " value="

 

">

 

 

 

 

 

 

<input>,

 

name, type value.

z

name

'

, type

,

value

 

.

 

:

 

 

 

 

 

 

 

<input name="email" type="hidden" value="spam@nospam.ru">

 

 

 

+%

 

$egT_[f%

 

 

 

 

 

 

 

 

(

 

 

 

 

6[bgffkbW7

 

S_W7x

hSgW7

8

 

 

 

 

 

 

 

,

4fkbW7egT_[f

hSgW7

 

(z

S_W

 

 

'

 

 

'

 

 

'

'

 

(

 

 

 

7

 

(

 

 

 

++%

 

$TdaieW%

 

 

 

 

 

 

 

(

TdaieW

 

6ad_86)ad_8(

 

6ad_8

 

 

WUdkbf(z

WUdkbf

 

_gf[bSdf)ad_ - VSfS'

 

'

 

 

 

(

 

 

 

 

 

- "file".

 

<form enctype="multipart/form - data" action="upload.php" method="post">

 

 

 

 

: <input name="my_file" type="file">

 

 

 

<input type="submit" value="

">

 

 

 

 

</form>

 

 

 

 

 

 

12)(fieldset)

' fieldset

 

 

' .

 

</fieldset>.

 

<legend></legend>.

'

-

.

 

 

 

 

 

 

 

 

:

 

 

 

 

 

 

 

 

<fieldset>

 

 

 

 

 

 

 

 

<legend>

 

 

(

 

 

)</legend>

 

'

 

 

 

 

(6)[WVeWf8

 

'

 

 

A DC-

 

GAG

 

 

RGF

R > '

 

 

 

_WfaV

(

 

 

 

 

 

 

 

 

 

 

 

 

 

+

 

 

4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(

 

 

 

 

 

 

 

 

4

A DC

GAG-

 

 

 

(

4

 

 

 

 

 

 

 

 

 

4ad_(f_ SUf[a(bb(

ad_(f_

f_ -

_kfWjf

 

_e 4

 

 

 

 

<form action="action.php" name="myform" method="post"> <input type="text" name="mytext" size="50">

<textarea name="msg" cols="20" rows="10" ></textarea>