如题所述
ç±»èªå¨å è½½è·è·¯ç±æ¯æ¡æ¶æåºç¡çç¹æ§
ç»ä½ ç¹èªå¨å è½½çæè·¯ï¼é¦å ç°å¨åæ¡æ¶å¿ é¡»ç¨ä¸å½å空é´ï¼æ¡æ¶å é¨çç±»æä»¶å¤¹æ ¹æ®å½å空é´å½åæ¹ä¾¿èªå¨å è½½
å¨å ¥å£æ件å¼å ¥èªå·±åçAutoload.php éè¿spl_autoload_registerè·å¾è¦å è½½çç±»å
spl_autoload_register(function ($class_name) {Autoload::splAutoload($class_name);
});
asseek\route\Router
asseek\Func
asseek\route\Route
app\www\docs\docsController
asseek\Controller
asseek\View
å¦æä½ éç¨å½å空é´ä¸é¢å½æ°ç$class_nameæ¯ç±»ä¼¼è¿æ ·çå符串ï¼åªè¦ä½ æå½å项ç®çåå§è·¯å¾åæ ¹æ®è¿æ®µå符串 requireç¸åºçphpæ件åºè¯¥ä¸é¾ï¼èªå¨å 载就æå®äºã
è·¯ç±å°±æ´ç®åäºå°±æ¯éè¿$_SERVER['REDIRECT_URL'] æ$_SERVER['REDIRECT_URI'] è·å¾ç¨æ·è®¿é®çURLï¼æ ¹æ®èªå·±çæ¡æ¶å¶å®çè§åä»URLä¸åå¾æ§å¶å¨ä¸æ§å¶å¨æ¹æ³å称ï¼å¤æcontrollerçç±»æ¯å¦åå¨ï¼åå¨åå®ä¾åï¼åå¤æcontrollerçmethodæ¯å¦åå¨ï¼åå¨åè°ç¨æ¹æ³ï¼æ¹æ³éé¢å è½½è§å¾çå°±æ¯å¦å¤çäºæ äºã