Title: PHP: Personal Home Page HypertextPreProceccor
1PHP ?? ???????? ???????? ????????????
???-??????? (Personal Home Page) ?? ?????????????
(HypertextPreProceccor)
2??????? PHP
- 1995 - PHP/FI (Personal Home Page / Forms
Interpreter ???????????? ???????? ????????/
????????????? ????). - 1997 - PHP PHP/FI 2.0
- 1998 - PHP 3.0 - Hypertext Preprocessor
- 1999 - PHP 4.0 Zend Engine
- ?\????? - PHP 5.0
3??????????? PHP
- ???????? ???????? ), ??????? ??????????? ??
??????? ??????? - ???????? ????????, ????????????? ? ?????????
?????? - ???????? GUI-??????????
4??????????? ????????? CGI
- CGI-????????? ????? ??? ?????????????? ? ????,
??????? ????????? ? ?????? ????????????
?????????? - ? ???????? ???????? ??????? ?????????? ?????????
????????? ??????? ?? ????? ???????????? - ?????????-???? ????? ???? ??????? ?? ??????
C/C, Fortran, Perl, TCL, Unix Schell, Visual
Basic, Apple Script - ???????? ? ?????????? cgi-bin WWW-???????
5?????????????? ???????-?????? ??? ??????
CGI-???????????
6?????? PHP?
- ????? ? ????????
- ?????????????? ????? ?? ???? ????????? ??????????
- ??? ????? ?????????? ??????? ? ????????????????
????????? ? ??????????? - ? ?????? ??????
7?????????????? ? ??????? ???????
- ????????? ???????? Java ? ??????????? ??
????????????? ? ???????? ???????? PHP. - ?????????? CORBA ??? ??????? ? ?????????
???????? - ???????????? ?????????? ?????? ? ??????? ??
PerlUNIX - ??????????? ????????? - ??????? ????????
(Cybercash, CyberMUT, VeriSign Payflow Pro ? CCVS)
8?????????? ????? VBScript, JavaScript, CGI
9??????????? ??????????????
- ?????????? ??????-??????
- ???-??????
- ?? - ????????????? PHP ???-???????
- PHP
- ???? (MySQL)
10????????? ???-??????? Apache ??? Windows XP
- ????????
- http//www.apache.org
- ? ?????? ?????????????
- ????? ??????????? ? ????????? ???? ??????
- ????
- apache_1.3.29-win3x86-no_src.exe
- ???????? ???????????? ????????? ???????? ? ????
???????? - http//localhost/.
11???? ????????? ??????? mime.types
- ServerRoot
- c\Program Files\Apache Group\Apache\htdocs
- ???
- c\Program Files\Apache Group\Apache\users\
- UserDir
- c\users\
- ?????? ? ?????
- http//localhost/test.html ??? http//localhost/u
ser/test.html
12????? ???????????? ??????? (Apache
Group\Apache2\conf)
- mime.types
- text/html
- html htm shtml shtm php phtml
- httpd.conf
- DocumenRoot
- F\site\main\html
- ServerRoot
- c\Program Files\Apache Group\Apache\htdocs
- ???
- c\Program Files\Apache Group\Apache\users\
- UserDir
- c\users\
- ?????? ? ?????
- http//localhost/test.html ??? http//localhost/u
ser/test.html
13????????? MySQL
14?????? ? MySQL
- ?????? ????????? c\mysql\bin\mysql
- ???????? mysql gt___ - ???????? ????? ???????
- ???????? ?? create database site_iu6
- ???????? ???????
- use site_iu6
- create table tutors (options)
- ???????? ?????????? show databases
- ???????? ?????????? show tables
- ???????? ?????????? describe table tutors
- ????????? ????????? (show databases)
- ?????? ? ?????????
- use site_iu6
- create table tutors (options)
- describe tutors
- alter
- drop
- ?????????? ?? (INSERT, SELECT, DELETE, UPDATE,
SHOW)
15??????? ?? ???????????? ??????
- ?????????? MySQL, ??????????????? ???? my.ini ???
my.cnf - ????????? ?????? ?? (c\mysql\bin\mysql)
- ??????? ?? ??????? ??6 (create database if not
exests site_iu6 - ????????? ????????? (show databases)
- ???????? ???????
- auth
- count
- guest
- history
- course
- ?????????? ?????? ?? (INSERT, SELECT, DELETE,
UPDATE, SHOW)
16(No Transcript)
17????????? PHP ??? Windows
- ????????
- http//www.php.net
- ? ?????? ?????????????
- ????? ??????????? ? ????????? ???? ??????
- ???????? ???????????? ????????? PHP
18??? ???? ????????? PHP
- CGI-??????
- (php.exe)
- httpd.conf
- ScriptAlias /php/ "c/php/"
- AddType application/x-httpd-php .php .phtml
- Action application/x-httpd-php "/php/php.exe"
- ????? SAPI-???????, ???????????? ????????
(php4isapi.dll) - httpd.conf
- LoadModule php4_module c/php/sapi/php4apache.dll
- AddType application/x-httpd-php .php .phtml
- AddModule mod_php4.c
19??? ???? ????????? PHP
- CGI-??????
- (php.exe)
- httpd.conf
- ScriptAlias /php/ "c/php/"
- AddType application/x-httpd-php .php .phtml
- Action application/x-httpd-php "/php/php.exe"
- ????? SAPI-???????, ???????????? ????????
(php4isapi.dll) - httpd.conf
- LoadModule php4_module c/php/sapi/php4apache.dll
- AddType application/x-httpd-php .php .phtml
- AddModule mod_php4.c
20????????? PHP ??? Windows
- ?????????????? ?????
- ?\windows\php.ini
- doc_root
- user_dir
- extension_dir
- doc_root "c\Program Files\Apache
Group\Apache\htdocs" - user_dir "c\users"
- extension_dir "c\php\extensions"
21????????? PHP ??? Windows
- ?????????????? ?????
- ?\windows\php.ini
- ??????????
- MS SQL
- ?????????????? ??????????
- 'extensionphp_.dll'
- extensionphp_mssql.dll
- c\php\dlls
22???????? ????????? ??????? ? PHP
- ????????????? ??????
- ??????? ???????? ???? (1.php)
- lt?php
- echolth1gt?????? ????!lt/h1gt"
- ?gt
- 3. ????????? ???? ? ?????????? c\users\your_nam
e - 4. ????????? ???? ?? ????????, ??????
- http//localhost/your_name/1.php
23??????????? ??????
- ??? ?????????? ?????????????, ???????? ?????????
???????? ? PHP - http//dklab.ru/chicken/web/
24?????? PHP-?????????
- lthtmlgt
- ltheadgt
- lttitlegt??????lt/titlegt
- lt/headgt
- ltbodygt
- lt?php echo "ltpgt??????, ? ?????? PHP!lt/pgt"
- ?gt
- lt/bodygt
- lt/htmlgt
25?????? PHP-?????????
- lthtmlgt
- ltheadgt
- lttitlegt??????lt/titlegt
- lt/headgt
- ltbodygt
- lt?php echo "ltpgt??????, ? ?????? PHP!lt/pgt"
- ?gt
- lt/bodygt
- lt/htmlgt
- lthtmlgt
- ltheadgt
- lttitlegt??????lt/titlegt
- lt/headgt
- ltbodygt
- ltpgt??????, ? ?????? PHP!
- lt/pgt
- lt/bodygt
- lt/htmlgt
26PHP-??????? ? HTML-????
- lt? echo "??? ?????????? ?????????? ??? ?????????
PHP" ?gt - 2. ltscript language"php"gt echo "?????????
????????? (FrontPage) ???????????? ?????? ???"
- lt/scriptgt
- 3. lt echo "????? ???????????? ???? ? ????? ASP
" - gt
27???????????? ???????? php
- ???, ??? ???????? ?????? ????? www, (????????,
??? ??, ??? ????? ???????? ?????????) - ???? php-???? ????? ?? ????????? ??????, ?? ???
????? ?????????? ? ??????? ??????????????
????????? ??????
28?????? ????????????? ? ??????? ?????
29SSI - Server Side Includes
- ??????????? ??????????
- .shtml ??? .shtm
- lt!- - command param"value" --gt
- ??? - ??????? ?????? SSI-???????
- command - SSI-???????
- param - ????????? SSI-???????.
30SSI-???????
- lt!- - include virtual"/path/file.ssi" --gt
- ???
- include - ??????? ???????
- virtual - ????????, ????????????, ??? ??????????
???? - ??? ?????????? (file) ??? ???
????????????? (virtual) - "/path/file.ssi" - ???? ? ??????????? ?????