如题所述
ThinkPHP ç±»åºè¯´æ
ThinkPHP åºç±»åº
ç±»åºæ¯ ThinkPHP çæ ¸å¿é¨åï¼è ThinkPHP åéè¿åºç±»åºçæ¦å¿µæææç³»ç»ç±»åºé½éä¸å¨ä¸èµ·ç®¡çãæ ¸å¿åºç±»åºå æ¬å®ææ¡æ¶çéç¨æ§å¼åèå¿ é¡»çåºç¡ç±»å常ç¨å·¥å ·ç±»ã
åºç±»åºä½äº ThinkPHP ç³»ç»ç®å½ä¸é¢ç Lib/Think ç®å½å ï¼ç±ä¸é¢å 个é¨åç»æï¼
Coreï¼æ ¸å¿ç±»åºå
Dbï¼æ°æ®åºç±»åºå
Exceptionï¼å¼å¸¸å¤çç±»åºå
Templateï¼å 置模æ¿å¼æç±»åºå
Utilï¼ç³»ç»å·¥å ·ç±»åºå
Core æ ¸å¿ç±»åº
Core æ ¸å¿ç±»åºå æ¬å¦ä¸ç±»æ件ï¼ç®å½ï¼ï¼
Think.class.phpï¼ç³»ç»åºç±»
App.class.phpï¼åºç¨ç¨åºç±»ï¼æ§è¡åºç¨ç®¡ç
Action.class.phpï¼æ§å¶å¨åºç±»
Model.class.phpï¼æ¨¡ååºç±»
Model/AdvModel.class.phpï¼é«çº§æ¨¡åç±»
Model/RelationModel.class.phpï¼å ³è模åç±»
Model/ViewModel.class.phpï¼è§å¾æ¨¡åç±»
Log.class.phpï¼æ¥å¿å¤çç±»
View.class.phpï¼è§å¾è¾åºç±»
Db æ°æ®åºç±»åº
Db æ ¸å¿ç±»åºå æ¬å¦ä¸ç±»æ件ï¼ç®å½ï¼ï¼
Db.class.phpï¼æ°æ®åºä¸é´å±å®ç°ç±»
Driver/DbMysql.class.phpï¼Mysql æ°æ®åºé©±å¨ç±»
Driver/DbMysqli.class.phpï¼Mysqli æ°æ®åºé©±å¨ç±»
Driver/DbPdo.class.phpï¼PDO æ°æ®åºé©±å¨ç±»
Driver/DbPgsql.class.phpï¼Pgsql æ°æ®åºé©±å¨ç±»
Driver/DbSqlite.class.phpï¼Sqlite æ°æ®åºé©±å¨ç±»
Driver/DbOracle.class.phpï¼Oracle æ°æ®åºé©±å¨ç±»
Driver/DbMssql.class.phpï¼Mssql æ°æ®åºé©±å¨ç±»
Driver/DbIbase.class.phpï¼Ibase æ°æ®åºé©±å¨ç±»
å¨ Driver ç®å½ä¸é对ä¸åæ°æ®åºæä¸åçæ°æ®åºé©±å¨ç±»ï¼ç¶ååéè¿ Db.class.php æ°æ®åºä¸é´å±å®ç°ç±»å å·¥åï¼å±ç°å¨ ThinkPHP 使ç¨è é¢åçå°±æ¯ç»ä¸çæ°æ®åºæä½æ¨¡åã
Exception å¼å¸¸å¤çç±»åº
Exception å¼å¸¸å¤çç±»åºå åªå å«ä¸ä¸ªç±»æ件ï¼ThinkException.class.php ç³»ç»å¼å¸¸åºç±»ã
Template å 置模æ¿å¼æç±»åº
Template å 置模æ¿å¼æç±»åºå æ¬å¦ä¸ç±»æ件ï¼ç®å½ï¼ï¼ã
ThinkTemplate.class.phpï¼å 置模æ¿å¼æç±»
TagLib.class.phpï¼æ ç¾åºåºç±»
TagLib/TagLibCx.class.phpï¼CX æ ç¾åºè§£æç±»
TagLib/TagLibHtml.class.phpï¼HTML æ ç¾åºè§£æç±»
Util ç³»ç»å·¥å ·ç±»åºå
Util ç³»ç»å·¥å ·ç±»åºå æä¾äºç³»ç»å¼åä¸ä¸äºåºæ¬çå·¥å ·ï¼å ·ä½å æ¬ï¼
Behavior.class.phpï¼è¡ä¸ºæ©å±åºç±»
Cache.class.phpï¼ç¼å管çç±»
Cookie.class.phpï¼Cookie 管çç±»
Debug.class.phpï¼ç³»ç»è°è¯ç±»
Dispatcher.class.phpï¼URL 解æãè·¯ç±åè°åº¦ç®¡çç±»
HtmlCache.class.phpï¼éæç¼åç±»
Session.class.phpï¼Session 管çç±»
Widget.class.phpï¼æ件åºç¨ç±»
Cache/ï¼åç±»åç¼åç±»æ件ç®å½ï¼å æ¬ï¼æ件ç¼åç±»ãSqliteç¼åç±»ãApachenoteç¼åç±»ãMemcacheç¼åç±»ãXcacheç¼åç±»ãæ°æ®åºç±»åç¼åç±»ç
Template/ï¼æ¨¡æ¿å¼æ解æç±»ç®å½ï¼å æ¬ï¼EaseTemplate模æ¿å¼æ解æç±»ãTemplateLite模æ¿å¼æ解æç±»ãSmart模æ¿å¼æ解æç±»ãSmarty模æ¿å¼æ解æç±»ãThink模æ¿å¼æ解æç±»
ThinkPHP æ©å±ç±»åº
ThinkPHP å®æ¹ç½ç«é¢å¤æä¾äºå¾å¤çåºç±»åºæ©å±ï¼è¿äºæ©å±ç±»åºå¿ é¡»æ¾ç½®äº ThinkPHPç³»ç»ç®å½/Lib ç®å½ä¸ç ORG æ Com ç±»åºå å è¿è¡ç®¡çã
对äºéè¦æ·»å è¿å ¥æ©å±ç±»åºå çç±»åºï¼å¯ä»¥ç´æ¥å¸¦è·¯å¾æ·è´ç±»åºæ件å°æ©å±ç±»åºç®¡çç®å½å°±å¯ä»¥ä½¿ç¨äºãä¾å¦è¦ä½¿ç¨ Util/Page.class.php å页æ©å±ç±»åºï¼ç´æ¥å°æ©å±ç±»åºç®¡çç®å½å½¢æ Lib/ORG/Util/Page.class.php å³å¯ã
对æ©å±ç±»åºéè¦ä½¿ç¨ import æä»¤å¯¼å ¥æ¹å¯ä½¿ç¨ï¼å ·ä½åèæ¬èå 容ãThinkPHP import ç±»åºå¯¼å ¥ãã
åºç¨ç±»åº
åºç¨ç±»åºæ¯æ项ç®ä¸èªå·±å®ä¹æè 使ç¨çç±»åºãåºç¨ç±»åºç®å½ä½äºé¡¹ç®ç®å½ä¸é¢ç Lib ç®å½ã
以ä¸æ¯ ThinkPHP æ ¸å¿ ââ ç±»åºççä»ç»ãäºè§£ ThinkPHP ç±»åºæå©äºæ们äºè§£ ThinkPHP çå±æ¬¡ç»æåå·¥ä½åçï¼å¿ è¦çæ¶ååèè¿äºç±»åºçæºä»£ç ä¹æå©äºé®é¢ç解å³ã
ThinkPHP åºç±»åº
ç±»åºæ¯ ThinkPHP çæ ¸å¿é¨åï¼è ThinkPHP åéè¿åºç±»åºçæ¦å¿µæææç³»ç»ç±»åºé½éä¸å¨ä¸èµ·ç®¡çãæ ¸å¿åºç±»åºå æ¬å®ææ¡æ¶çéç¨æ§å¼åèå¿ é¡»çåºç¡ç±»å常ç¨å·¥å ·ç±»ã
åºç±»åºä½äº ThinkPHP ç³»ç»ç®å½ä¸é¢ç Lib/Think ç®å½å ï¼ç±ä¸é¢å 个é¨åç»æï¼
Coreï¼æ ¸å¿ç±»åºå
Dbï¼æ°æ®åºç±»åºå
Exceptionï¼å¼å¸¸å¤çç±»åºå
Templateï¼å 置模æ¿å¼æç±»åºå
Utilï¼ç³»ç»å·¥å ·ç±»åºå
Core æ ¸å¿ç±»åº
Core æ ¸å¿ç±»åºå æ¬å¦ä¸ç±»æ件ï¼ç®å½ï¼ï¼
Think.class.phpï¼ç³»ç»åºç±»
App.class.phpï¼åºç¨ç¨åºç±»ï¼æ§è¡åºç¨ç®¡ç
Action.class.phpï¼æ§å¶å¨åºç±»
Model.class.phpï¼æ¨¡ååºç±»
Model/AdvModel.class.phpï¼é«çº§æ¨¡åç±»
Model/RelationModel.class.phpï¼å ³è模åç±»
Model/ViewModel.class.phpï¼è§å¾æ¨¡åç±»
Log.class.phpï¼æ¥å¿å¤çç±»
View.class.phpï¼è§å¾è¾åºç±»
Db æ°æ®åºç±»åº
Db æ ¸å¿ç±»åºå æ¬å¦ä¸ç±»æ件ï¼ç®å½ï¼ï¼
Db.class.phpï¼æ°æ®åºä¸é´å±å®ç°ç±»
Driver/DbMysql.class.phpï¼Mysql æ°æ®åºé©±å¨ç±»
Driver/DbMysqli.class.phpï¼Mysqli æ°æ®åºé©±å¨ç±»
Driver/DbPdo.class.phpï¼PDO æ°æ®åºé©±å¨ç±»
Driver/DbPgsql.class.phpï¼Pgsql æ°æ®åºé©±å¨ç±»
Driver/DbSqlite.class.phpï¼Sqlite æ°æ®åºé©±å¨ç±»
Driver/DbOracle.class.phpï¼Oracle æ°æ®åºé©±å¨ç±»
Driver/DbMssql.class.phpï¼Mssql æ°æ®åºé©±å¨ç±»
Driver/DbIbase.class.phpï¼Ibase æ°æ®åºé©±å¨ç±»
å¨ Driver ç®å½ä¸é对ä¸åæ°æ®åºæä¸åçæ°æ®åºé©±å¨ç±»ï¼ç¶ååéè¿ Db.class.php æ°æ®åºä¸é´å±å®ç°ç±»å å·¥åï¼å±ç°å¨ ThinkPHP 使ç¨è é¢åçå°±æ¯ç»ä¸çæ°æ®åºæä½æ¨¡åã
Exception å¼å¸¸å¤çç±»åº
Exception å¼å¸¸å¤çç±»åºå åªå å«ä¸ä¸ªç±»æ件ï¼ThinkException.class.php ç³»ç»å¼å¸¸åºç±»ã
Template å 置模æ¿å¼æç±»åº
Template å 置模æ¿å¼æç±»åºå æ¬å¦ä¸ç±»æ件ï¼ç®å½ï¼ï¼ã
ThinkTemplate.class.phpï¼å 置模æ¿å¼æç±»
TagLib.class.phpï¼æ ç¾åºåºç±»
TagLib/TagLibCx.class.phpï¼CX æ ç¾åºè§£æç±»
TagLib/TagLibHtml.class.phpï¼HTML æ ç¾åºè§£æç±»
Util ç³»ç»å·¥å ·ç±»åºå
Util ç³»ç»å·¥å ·ç±»åºå æä¾äºç³»ç»å¼åä¸ä¸äºåºæ¬çå·¥å ·ï¼å ·ä½å æ¬ï¼
Behavior.class.phpï¼è¡ä¸ºæ©å±åºç±»
Cache.class.phpï¼ç¼å管çç±»
Cookie.class.phpï¼Cookie 管çç±»
Debug.class.phpï¼ç³»ç»è°è¯ç±»
Dispatcher.class.phpï¼URL 解æãè·¯ç±åè°åº¦ç®¡çç±»
HtmlCache.class.phpï¼éæç¼åç±»
Session.class.phpï¼Session 管çç±»
Widget.class.phpï¼æ件åºç¨ç±»
Cache/ï¼åç±»åç¼åç±»æ件ç®å½ï¼å æ¬ï¼æ件ç¼åç±»ãSqliteç¼åç±»ãApachenoteç¼åç±»ãMemcacheç¼åç±»ãXcacheç¼åç±»ãæ°æ®åºç±»åç¼åç±»ç
Template/ï¼æ¨¡æ¿å¼æ解æç±»ç®å½ï¼å æ¬ï¼EaseTemplate模æ¿å¼æ解æç±»ãTemplateLite模æ¿å¼æ解æç±»ãSmart模æ¿å¼æ解æç±»ãSmarty模æ¿å¼æ解æç±»ãThink模æ¿å¼æ解æç±»
ThinkPHP æ©å±ç±»åº
ThinkPHP å®æ¹ç½ç«é¢å¤æä¾äºå¾å¤çåºç±»åºæ©å±ï¼è¿äºæ©å±ç±»åºå¿ é¡»æ¾ç½®äº ThinkPHPç³»ç»ç®å½/Lib ç®å½ä¸ç ORG æ Com ç±»åºå å è¿è¡ç®¡çã
对äºéè¦æ·»å è¿å ¥æ©å±ç±»åºå çç±»åºï¼å¯ä»¥ç´æ¥å¸¦è·¯å¾æ·è´ç±»åºæ件å°æ©å±ç±»åºç®¡çç®å½å°±å¯ä»¥ä½¿ç¨äºãä¾å¦è¦ä½¿ç¨ Util/Page.class.php å页æ©å±ç±»åºï¼ç´æ¥å°æ©å±ç±»åºç®¡çç®å½å½¢æ Lib/ORG/Util/Page.class.php å³å¯ã
对æ©å±ç±»åºéè¦ä½¿ç¨ import æä»¤å¯¼å ¥æ¹å¯ä½¿ç¨ï¼å ·ä½åèæ¬èå 容ãThinkPHP import ç±»åºå¯¼å ¥ãã
åºç¨ç±»åº
åºç¨ç±»åºæ¯æ项ç®ä¸èªå·±å®ä¹æè 使ç¨çç±»åºãåºç¨ç±»åºç®å½ä½äºé¡¹ç®ç®å½ä¸é¢ç Lib ç®å½ã
以ä¸æ¯ ThinkPHP æ ¸å¿ ââ ç±»åºççä»ç»ãäºè§£ ThinkPHP ç±»åºæå©äºæ们äºè§£ ThinkPHP çå±æ¬¡ç»æåå·¥ä½åçï¼å¿ è¦çæ¶ååèè¿äºç±»åºçæºä»£ç ä¹æå©äºé®é¢ç解å³ã
温馨提示:答案为网友推荐,仅供参考