1.PHPè¯è¨çç¹ç¹ï¼
2.php,binder 源码jsp,aspä¸è
ä¼ç¼ºç¹...
PHPè¯è¨çç¹ç¹ï¼
phpæåªäºä¼å¿åç¹ç¹
PHPçä¼å¿å æ¬ï¼
PHPå¼æ¾çæºä»£ç
ææçPHPæºä»£ç äºå®ä¸é½å¯ä»¥å¾å°ã
PHPæ¯å è´¹ç
åå ¶å®ææ¯ç¸æ¯ï¼PHPæ¬èº«å è´¹ä¸æ¯å¼æºä»£ç ã
å¿«æ·æ§
ç¨åºå¼åå¿«ï¼è¿è¡å¿«ï¼ææ¯æ¬èº«å¦ä¹ å¿«ãåµå ¥äºHTMLï¼å 为PHPå¯ä»¥è¢«åµå ¥äºHTMLè¯è¨ï¼å®ç¸å¯¹äºå ¶ä»è¯è¨ãç¼è¾ç®åï¼å®ç¨æ§å¼ºï¼æ´éååå¦è ã
跨平å°æ§å¼º
ç±äºPHPæ¯è¿è¡å¨æå¡å¨ç«¯çèæ¬ï¼å¯ä»¥è¿è¡å¨UNIXãLINUXãWINDOWSãMacOSä¸ã
æçé«
PHPæ¶èç¸å½å°çç³»ç»èµæºã
å¾åå¤ç
ç¨PHPå¨æå建å¾å,PHPå¾åå¤çé»è®¤ä½¿ç¨GD2ãä¸ä¹å¯ä»¥é 置为使ç¨imagemagickè¿è¡å¾åå¤çã
é¢å对象
å¨php4,php5ä¸ï¼é¢å对象æ¹é¢é½æäºå¾å¤§çæ¹è¿ï¼phpå®å ¨å¯ä»¥ç¨æ¥å¼å大ååä¸ç¨åºã
ä¸ä¸ä¸æ³¨
PHPæ¯æèæ¬è¯è¨ä¸ºä¸»ï¼å为类Cè¯è¨ï¼å®¹æå ¥é¨ã
phpçä¼ç¹æåªäº
PHPä½ä¸ºä¸ç§èæ¬è¯è¨ï¼æ以ä¸å 个ä¼ç¹ï¼
1.æäºå¦ä¹ å使ç¨ï¼PHPçè¯æ³æäºç解åä¸æï¼å¯¹åå¦è æ¥è¯´æ¯è¾å好ï¼å¾å®¹æææ¡ã
2.é«åº¦å ¼å®¹æ§ï¼PHPå¯ä»¥è¿è¡å¨å ä¹ææçæä½ç³»ç»ä¸ï¼å¹¶ä¸æ¯æ大å¤æ°çWebæå¡å¨åæ°æ®åºã
3.足å¤çæ©å±æ§ï¼PHPæ¯æ大éçæ©å±ååºï¼åç§åè½æ¨¡ååï¼æ¹ä¾¿å¿«æ·ç模ååæä½ï¼å¯ä»¥è®©å¼åè è½»æ¾å建å¤æçåè½ã
4.å¼åé度快ï¼PHPæä¾ä¸°å¯çå ç½®å½æ°åç±»åºï¼å¯ä»¥å¸®å©å¼åè å¿«éå®æ代ç ç¼åï¼å¹¶å¿«éè¿ä»£å¼åã
5.é«æï¼PHPçè¿è¡é度ç¸å¯¹è¾å¿«ï¼å ç¨èµæºä½ï¼å¯ä»¥å¤ç大éç访é®è¯·æ±ï¼éåç¨äºé«å¹¶åçWebç½ç«ã
6.å®å ¨æ§é«ï¼PHPææççå®å ¨æºå¶åé²èæªæ½ï¼å¯ä»¥ææé²æ¤ä¸äºå¸¸è§çç½ç»æ»å»ï¼å¦SQLæ³¨å ¥ãXSSæ»å»çã
7.社åºæ¯æ强大ï¼PHPæä¸ä¸ªå¼ºå¤§çå¼åè 社åºï¼æä¾å¤§éçå·¥å ·ãæç¨åæ¯æï¼æ¹ä¾¿å¼åè è½å¤å¿«éå¾å°å¸®å©ã
æ»çæ¥è¯´ï¼PHPå ·ææå¦æç¨ãé«æãçµæ´»ãå¯æ©å±æ§å¼ºãå®å ¨ç¨³å®çç¹ç¹ï¼è¿äºä¼ç¹ä½¿å¾å®æ为äºWebå¼åé¢åä¸å¹¿æ³ä½¿ç¨çä¸ç§ç¼ç¨è¯è¨ã
phpçä¼ç¹æ»ç»phpæåªäºä¼ç¹PHPä¼ç¹ï¼
1.å ¥é¨å¿«ï¼æå ¶å®è¯è¨åºç¡çç¨åºåäºå¨å·¦å³çæ¶é´å°±å¯ä»¥å ¥é¨ï¼ä¸ä¸ªæå·¦å³çæ¶é´åºæ¬ä¸å°±å¯ä»¥å¼åç®åç项ç®äºã
2.å¼åææ¬ä½ï¼PHPæç»å ¸çç»åå°±æ¯ï¼Linux+Apache+MySQL+PHPãé常éåå¼åä¸å°åçwebåºç¨ï¼å 为ä¸æ容æï¼æ以å¼åçé度æ¯è¾å¿«ãèä¸ææç软件é½æ¯å¼æºå è´¹çï¼å¯ä»¥åå°æå ¥ã
3.PHPæ¯è§£éæ§çèæ¬è¯è¨ï¼åå®ä»£ç 以åå³å¯ä»¥æ§è¡ï¼ä¸åc,java,c++çè¯è¨è¿éè¦å»ç¼è¯æ§è¡ï¼ç¸å¯¹æ¥è¯´æ¯è¾èçæ¶é´ã
4.ç¸å¯¹æ¥è¯´ï¼PHPç¨åºåçèªæ°´çå¹³åå·¥èµè¦æ¯c,c++,javaç¨åºåçå¹³åå·¥èµè¦ä½ä¸äºï¼ç¹å«æ¯å¯¹äºä¸å°åä¼ä¸æ¥è¯´å¯ä»¥è约ä¸äºææ¬ã
5.é ç½®åé¨ç½²ç¸å¯¹ç®åä¸äºï¼å¯¹æ¯JAVAå¼åæ¥è¯´ï¼JAVAå¼åçé 置就å¤æå¤äºï¼ä»ä¹StructsãSpringãHibernateãTomcatççå¾å¤å°æ¹é½éè¦é ç½®ï¼çè³ä½ å¨ç¨åºä¸æ¯åä¸ä¸ªSQLè¯å¥é½éè¦å å¨Hibernateä¸é ç½®ä¸ä¸ï¼ææ¶éæ°é¨ç½²ä¸ä¸ªclassæ件æjaræ件è¿å¯è½éè¦éå¯Webæå¡å¨(TomcatæResinæå ¶å®çWebæå¡å¨)使æ°é¨ç½²çåºæ件çæã
PHPå¼åä¸ä¸»è¦æ¯PHPèªèº«çé ç½®æ件åWebæå¡å¨çé ç½®(å¦ApacheæNginxæLigpile ç¼è¯ï¼å®¹æç¼åï¼å¯å¨æå¡å¨ç«¯ç´æ¥æ§è¡ã
3. 使ç¨æ®éçææ¬ç¼è¾å¨ï¼å¦ Windows çè®°äºæ¬ï¼å³å¯è¿è¡ç¼è¾è®¾è®¡ã
4. ä¸æµè§å¨æ å ³ (Browser Independence), ç¨æ·ç«¯åªè¦ä½¿ç¨å¯æ§è¡ HTML ç çæµè§å¨ï¼å³
å¯æµè§ Active Server Pages æ设计çç½é¡µå 容ã Active Server Pages æ使ç¨çèæ¬è¯
è¨ (VBScript ã Jscript) åå¨ WEB æå¡å¨ç«¯æ§è¡ï¼ç¨æ·ç«¯çæµè§å¨ä¸éè¦è½å¤æ§è¡è¿äº
èæ¬è¯è¨ã
5.Active Server Pages è½ä¸ä»»ä½ ActiveX scripting è¯è¨ç¸å®¹ãé¤äºå¯ä½¿ç¨ VBScript
æ JScript è¯è¨æ¥è®¾è®¡å¤ï¼è¿éè¿ plugï¼in çæ¹å¼ï¼ä½¿ç¨ç±ç¬¬ä¸æ¹ææä¾çå ¶ä»èæ¬è¯è¨
ï¼è¬å¦ REXX ã Perl ã Tcl çãèæ¬å¼ææ¯å¤çèæ¬ç¨åºç COM(Component Object Mod
el) ç©ä»¶ã
6. å¯ä½¿ç¨æå¡å¨ç«¯çèæ¬æ¥äº§ç客æ·ç«¯çèæ¬ã
7.ActiveX Server Components(ActiveX æå¡å¨å 件 ) å ·ææ éå¯æ©å æ§ãå¯ä»¥ä½¿ç¨ Vi
sual Basic ã Java ã Visual Cï¼ï¼ ã COBOL çç¼ç¨è¯è¨æ¥ç¼åä½ æéè¦çActiveX Se
rver Component ã
PHP:
1ï¼æ°æ®åºè¿æ¥
PHPå¯ä»¥ç¼è¯æå ·æä¸è®¸å¤æ°æ®åºç¸è¿æ¥çå½æ°ãPHPä¸MySQLæ¯ç°å¨ç»ä½³çç»åãä½ è¿å¯
以èªå·±ç¼åå¤å´çå½æ°åé´æ¥ååæ°æ®åºãéè¿è¿æ ·çéå¾å½ä½ æ´æ¢ä½¿ç¨çæ°æ®åºæ¶ï¼å¯ä»¥
è½»æ¾å°æ´æ¹ç¼ç 以éåºè¿æ ·çåãPHPLIBå°±æ¯æ常ç¨çå¯ä»¥æä¾ä¸è¬äºå¡éè¦çä¸ç³»ååºåº
ãä½PHPæä¾çæ°æ®åºæ¥å£æ¯æå½¼æ¤ä¸ç»ä¸ï¼æ¯å¦å¯¹Oracle, MySQLï¼ Sybaseçæ¥å£ï¼å½¼æ¤
é½ä¸ä¸æ ·ãè¿ä¹æ¯PHPçä¸ä¸ªå¼±ç¹ã
2ï¼é¢å对象ç¼ç¨
PHPæä¾äºç±»å对象ãåºäºwebçç¼ç¨å·¥ä½é常éè¦é¢å对象ç¼ç¨è½åãPHPæ¯ææé å¨ã
æåç±»çã
JSP:
1ï¼å°å 容ççæåæ¾ç¤ºè¿è¡å离
使ç¨JSPææ¯ï¼Web页é¢å¼å人åå¯ä»¥ä½¿ç¨HTMLæè XMLæ è¯æ¥è®¾è®¡åæ ¼å¼åæç»é¡µé¢ã使
ç¨JSPæ è¯æè å°èæ¬æ¥çæ页é¢ä¸çå¨æå 容ãçæå 容çé»è¾è¢«å°è£ å¨æ è¯åJavaBeans
ç»ä»¶ä¸ï¼å¹¶ä¸æç»å¨å°èæ¬ä¸ï¼ææçèæ¬å¨æå¡å¨ç«¯è¿è¡ãå¦ææ ¸å¿é»è¾è¢«å°è£ å¨æ è¯å
Beansä¸ï¼é£ä¹å ¶ä»äººï¼å¦Web管ç人åå页é¢è®¾è®¡è ï¼è½å¤ç¼è¾å使ç¨JSP页é¢ï¼èä¸å½±åå
容ççæã
å¨æå¡å¨ç«¯ï¼JSPå¼æ解éJSPæ è¯åå°èæ¬ï¼çææ请æ±çå 容ï¼ä¾å¦ï¼éè¿è®¿é®Java
Beansç»ä»¶ï¼ä½¿ç¨JDBCTMææ¯è®¿é®æ°æ®åºï¼æè å å«æ件ï¼ï¼å¹¶ä¸å°ç»æ以HTMLï¼æè XMLï¼
页é¢çå½¢å¼åéåæµè§å¨ãè¿æå©äºä½è ä¿æ¤èªå·±ç代ç ï¼èåä¿è¯ä»»ä½åºäºHTMLçWebæµè§
å¨çå®å ¨å¯ç¨æ§ã
2ï¼å¼ºè°å¯éç¨çç»ä»¶
ç»å¤§å¤æ°JSP页é¢ä¾èµäºå¯éç¨çï¼è·¨å¹³å°çç»ä»¶ï¼JavaBeansæè Enterprise JavaBea
nsTMç»ä»¶ï¼æ¥æ§è¡åºç¨ç¨åºæè¦æ±çæ´ä¸ºå¤æçå¤çãå¼å人åè½å¤å ±äº«å交æ¢æ§è¡æ®éæ
ä½çç»ä»¶ï¼æè 使å¾è¿äºç»ä»¶ä¸ºæ´å¤ç使ç¨è æè 客æ·å¢ä½æ使ç¨ãåºäºç»ä»¶çæ¹æ³å éäº
æ»ä½å¼åè¿ç¨ï¼å¹¶ä¸ä½¿å¾åç§ç»ç»å¨ä»ä»¬ç°æçæè½åä¼åç»æçå¼ååªåä¸å¾å°å¹³è¡¡ã
3ï¼éç¨æ è¯ç®å页é¢å¼å
Web页é¢å¼å人åä¸ä¼é½æ¯çæèæ¬è¯è¨çç¼ç¨äººåãJavaServer Pageææ¯å°è£ äºè®¸å¤
åè½ï¼è¿äºåè½æ¯å¨æç¨çãä¸JSPç¸å ³çXMLæ è¯ä¸è¿è¡å¨æå 容çææéè¦çãæ åçJS
Pæ è¯è½å¤è®¿é®åå®ä¾åJavaBeansç»ä»¶ï¼è®¾ç½®æè æ£ç´¢ç»ä»¶å±æ§ï¼ä¸è½½Appletï¼ä»¥åæ§è¡ç¨
å ¶ä»æ¹æ³æ´é¾äºç¼ç åèæ¶çåè½ã
éè¿å¼åå®å¶åæ è¯åºï¼JSPææ¯æ¯å¯ä»¥æ©å±çãä»åï¼ç¬¬ä¸æ¹å¼å人ååå ¶ä»äººåå¯ä»¥
为常ç¨åè½å建èªå·±çæ è¯åºãè¿ä½¿å¾Web页é¢å¼å人åè½å¤ä½¿ç¨çæçå·¥å ·åå¦åæ è¯ä¸æ ·
çæ§è¡ç¹å®åè½çæ件æ¥å·¥ä½ã
JSPææ¯å¾å®¹ææ´åå°å¤ç§åºç¨ä½ç³»ç»æä¸ï¼ä»¥å©ç¨ç°åçå·¥å ·åæå·§ï¼å¹¶ä¸æ©å±å°è½å¤
æ¯æä¼ä¸çº§çåå¸å¼åºç¨ãä½ä¸ºéç¨Javaææ¯å®¶æçä¸é¨åï¼ä»¥åJava 2ï¼ä¼ä¸çä½ç³»ç»æ
ï¼çä¸ä¸ªç»æé¨åï¼JSPææ¯è½å¤æ¯æé«åº¦å¤æçåºäºWebçåºç¨ã
ç±äºJSP页é¢çå ç½®èæ¬è¯è¨æ¯åºäºJavaç¼ç¨è¯è¨çï¼èä¸ææçJSP页é¢é½è¢«ç¼è¯æ为
Java Servletï¼JSP页é¢å°±å ·æJavaææ¯çææ好å¤ï¼å æ¬å¥å£®çåå¨ç®¡çåå®å ¨æ§ã
ä½ä¸ºJavaå¹³å°çä¸é¨åï¼JSPæ¥æJavaç¼ç¨è¯è¨âä¸æ¬¡ç¼åï¼åå¤è¿è¡âçç¹ç¹ãéçè¶
æ¥è¶å¤çä¾åºåå°JSPæ¯ææ·»å å°ä»ä»¬ç产åä¸ï¼æ¨å¯ä»¥ä½¿ç¨èªå·±æéæ©çæå¡å¨åå·¥å ·ï¼æ´
æ¹å·¥å ·ææå¡å¨å¹¶ä¸å½±åå½åçåºç¨ã
åºç¨èå´
ASPæ¯Microsoftå¼åçå¨æç½é¡µè¯è¨ï¼ä¹ç»§æ¿äºå¾®è½¯äº§åçä¸è´¯ä¼ ç»ââåªè½è¿è¡äºå¾®è½¯
çæå¡å¨äº§å,IIS (Internet Information Server) (windows NT)åPWS(Personal Web Se
rver)(windows )ä¸ãUnixä¸ä¹æChiliSoftçæ件æ¥æ¯æASPï¼ä½æ¯ASPæ¬èº«çåè½æéï¼
å¿ é¡»éè¿ASPï¼COMçç»åæ¥æ©å ï¼Unixä¸çCOMå®ç°èµ·æ¥é常å°é¾ã
PHP3å¯å¨Windows,Unix,LinuxçWebæå¡å¨ä¸æ£å¸¸è¿è¡,è¿æ¯æIIS,Apacheçéç¨Webæå¡å¨
,ç¨æ·æ´æ¢å¹³å°æ¶,æ éåæ¢PHP3代ç ,å¯å³æ¿å³ç¨.
JSPåPHP3类似ï¼å ä¹å¯ä»¥è¿è¡äºææå¹³å°ãå¦Win NT,Linux,Unix. NTä¸IISéè¿ä¸ä¸ªæ
件ï¼ä¾å¦JRUNæè ServletExecï¼å°±è½æ¯æJSPãèåçWebæå¡å¨Apacheå·²ç»è½å¤æ¯æJSPã
ç±äºApache广æ³åºç¨å¨NTãUnixåLinuxä¸ï¼å æ¤JSPææ´å¹¿æ³çè¿è¡å¹³å°ãè½ç¶ç°å¨NTæä½
ç³»ç»å äºå¾å¤§çå¸åºä»½é¢ï¼ä½æ¯å¨æå¡å¨æ¹é¢Unixçä¼å¿ä»ç¶å¾å¤§ï¼èæ°å´èµ·çLinuxæ´æ¯æ¥
å¿ä¸å°ãä»ä¸ä¸ªå¹³å°ç§»æ¤å°å¦å¤ä¸ä¸ªå¹³å°ï¼JSPåJavaBeançè³ä¸ç¨éæ°ç¼è¯ï¼å 为Javaåè
ç é½æ¯æ åçä¸å¹³å°æ å ³çã
æ§è½æ¯è¾
æ人åè¿è¯éªï¼å¯¹è¿ä¸ç§è¯è¨åå«å循ç¯æ§è½æµè¯åååOracleæ°æ®åºæµè¯ã
å¨å¾ªç¯æ§è½æµè¯ä¸ï¼JSPåªç¨äºä»¤äººåæçåç§éå°±ç»æäºï¼ç循ç¯ãèASP
ãPHPæµè¯çæ¯ï¼å¾ªç¯ï¼å°ä¸ä¸ªæ°é级ï¼ï¼å´åå«ç¨äºç§åç§ãï¼åèPHPLIBï¼
ã
æ°æ®åºæµè¯ä¸ï¼ä¸è åå«å¯¹ Oracle 8 è¿è¡ 次 Insert,Update,Select,åDelete
ï¼ Jsp éè¦ ç§ï¼Php éè¦ ç§ï¼ASPå éè¦ ç§ã
åæ¯åæ
ç®åå¨å½å PHPä¸ASPåºç¨æ为广æ³ãèJSPç±äºæ¯ä¸ç§è¾æ°çææ¯ï¼å½å éç¨çè¾å°ãä½å¨
å½å¤ï¼JSPå·²ç»æ¯æ¯è¾æµè¡çä¸ç§ææ¯ï¼å°¤å ¶æ¯çµååå¡ç±»çç½ç«ï¼å¤éç¨JSPã
éç¨PHPçç½ç«å¦æ°æµªç½ï¼sinaï¼ãä¸å½äººï¼Chinarenï¼ç,ä½ç±äºPHPæ¬èº«åå¨çä¸äºç¼º
ç¹ï¼ä½¿å¾å®ä¸éååºç¨äºå¤§åçµååå¡ç«ç¹ï¼èæ´éåä¸äºå°åçåä¸ç«ç¹ã
é¦å ï¼PHP缺ä¹è§æ¨¡æ¯æãå ¶æ¬¡ï¼ç¼ºä¹å¤å±ç»ææ¯æã对äºå¤§è´è·ç«ç¹ï¼è§£å³æ¹æ³åªæä¸
个ï¼åå¸è®¡ç®ãæ°æ®åºãåºç¨é»è¾å±ã表示é»è¾å±å½¼æ¤åå¼ï¼èä¸åå±ä¹å¯ä»¥æ ¹æ®æµéåå¼
ï¼ç»æäºç»´éµåãèPHPå缺ä¹è¿ç§æ¯æãè¿æä¸é¢æå°è¿çä¸ç¹ï¼PHPæä¾çæ°æ®åºæ¥å£æ¯
æä¸ç»ä¸ï¼è¿å°±ä½¿å¾å®ä¸éåè¿ç¨å¨çµååå¡ä¸ã
ASPåJSPå没æ以ä¸ç¼ºé·ï¼ASPå¯ä»¥éè¿Microsoft WindowsdçCOM/DCOMè·å¾ActiveXè§
模æ¯æï¼éè¿DCOMåTranscation Serverè·å¾ç»ææ¯æï¼JSPå¯ä»¥éè¿SUN JavaçJava Clas
såEJBè·å¾è§æ¨¡æ¯æï¼éè¿EJB/CORBA以åä¼å¤ååçApplication Serverè·å¾ç»ææ¯æã
ä¸è ä¸ï¼JSPåºè¯¥æ¯æªæ¥åå±çè¶å¿ãä¸çä¸ä¸äºå¤§ççµååå¡è§£å³æ¹æ¡æä¾åé½éç¨J
SP/Servletãæ¯è¾åºåçå¦IBMçEï¼businessï¼å®çæ ¸å¿æ¯éç¨JSP/ServletçWebSphereï¼
西æ¹å¦å¤ä¸ä¸ªé常èåççµååå¡è½¯ä»¶æä¾åï¼Intershopãå®åæ¥ç产åIntershop1 2, 3
, 4å æ®äºä¸»è¦ççµååå¡è½¯ä»¶ä»½é¢ãå®ä»¬é½æ¯éè¿CGIæ¥æä¾æ¯æ çãä½å»å¹´æåå®æ¨åº
äºEnfinityï¼ä¸ä¸ªéç¨JSP/Servletççµååå¡Application Serverï¼èä¸å£°è¨ä¸åå¼åä¼ ç»
软件ã
æ»ä¹
ASPï¼PHP,JSPä¸è é½æç¸å½æ°éçæ¯æè ï¼ç±æ¤ä¹å¯ä»¥çåºä¸è åææé¿ãæ£å¨å¦ä¹ æ
使ç¨å¨æ页é¢çæåå¯æ ¹æ®ä¸è çç¹ç¹éæ©ä¸ç§éåèªå·±çè¯è¨ã