introduction to php
DESCRIPTION
Introduction to PHP. 靜態網頁. Step 1 : Client 透過 Internet 向 Web Server 提出瀏覽某個 HTML 檔案的需求。 Step 2 :若 Web Server 上有該網頁的話,便將其內容回傳給 Client 。. 動態網頁. Step 1 : Client 透過 Internet 向 Web Server 提出瀏覽某個 PHP 檔案的需求。 Step 2 : Web Server 會先將其內容轉給 PHP 解譯程式處理。 - PowerPoint PPT PresentationTRANSCRIPT
-
Introduction to PHP
-
Step 1Client Internet Web Server HTML Step 2Web Server Client
-
Step 1Client Internet Web Server PHP Step 2Web Server PHPStep 3Database /Step 4Web ServerStep 5Web ServerClient
-
PHP?PHPPersonal Home PagePHP3Hypertext Preprocessor PHPHTMLHTML C/C++Java
-
PHP?*.html Web Server *. phpPHPPHP HTML PHP*.phpServerphp.exe
-
HTML
-
HTML
-
PHPPHP
.php
Example
-
PHP/**///PHPHTML;
-
PHPPHP(integer) (float) (boolean) (string) $
-
PHP
-
PHPPHPPHP
-
PHP
-
PHP
PHP578.5html
-
PHPif(1) { 1; } elseif(2) { 2; }else {; }
PHPelse
-
PHPwhile() { ;;}
0123456789PHP
-
PHPfor(; ; ) {;;}
0123456789PHP
-
PHPswitch() {case 1: 1;break;case 2: 2; break;default: ;break;}
PHP0
-
, Ex: GoogleHTML(Form)Web server,
-
(Form), (Text), (Password), (Radio), (Check Box), :(Text Area)web server
-
(Form)GETPOSTGET255 ?1=&2=http;//localhost/get.php?a=1&b=2POSTphp
GETPOSTserver, php
-
KompoZer
-
phpGETPOST, GET
-
Form FieldText Area, :Submit Button
-
TextTextname, server, name=John (John)
-
Check Box, servercheck=on
-
Radio ButtonRadio Button, Group, GroupGroup Name, sex=boy
-
Text AreaText AreaText AreTextAreaHello World, serverMessage=Hello+World
-
Submit Button
Submit ButtonField Valuebutton
-
http://pads8.cs.nthu.edu.tw:8000/get.php?key=John&check=on&sex=boy&Message=Hello+World&submit=submit
-
PHPGETGETPHP$_GEThttp;//localhost/get.php?a=1&b=2$_GET[a]; $_GET[b];
-
http://pads8.cs.nthu.edu.tw:8000/get.php?key=John&check=on&sex=boy&Message=Hello+World&submit=submit
GETPHPPHPStringfunction
-
, 400, ; 400, 50
-
ReferencePHP5http://www.php5.idv.tw/html.php?mod=article&act=index&cid=3CGIhttp://ind.ntou.edu.tw/~dada/cgi/CGIprog.htmPHP, Little Chen, http://www.csie.nfu.edu.tw/phpBB2/download.php?id=1732&sid=2831850096e414beadd50967981c2536PHPhttp://km.tceb.edu.tw/~wsx/php/index.htm
***********************************