如题所述
1ï¼é¦å
æ¥çThinkPHPæ ¸å¿æ件core.phpï¼åç°å¼å
¥çåç§ç±»phpä¸ï¼æä¸å为ï¼View.class.phpï¼è§å¾ç±»ã顾åæä¹æ¤ç±»åºä¸æ¨¡æ¿è¾åºãç¼ååç¸å
³æä½æå
³ã
2ï¼
æå¼View.class.phpï¼ç¨eclipseçoutlineè§å¾æ¥ç该类çç»æï¼åç°ä¸æ¹æ³å为ï¼buildHtml()ï¼å建éæ页é¢ãæ¤æ¹
æ³æä¸è¡ä»£ç 为ï¼$htmlpath = !empty($htmlpath)?$htmlpath:HTML_PATH;
è¿è¡ä»£ç å¾
æ¾ç¶æ¯å®ä¹éæ页é¢çè·¯å¾çï¼å ¶ä¸å¯ä»¥çå°åé¢è¯´å°çHTML_PATHã使ç¨eclipseçæ¥çåéæºä½ç½®ï¼æä½ctrlï¼é¼ æ å·¦é®ç¹å»åéï¼ï¼å¯ä»¥
çå°æ2个ä¾è¿½è¸ªçåéæºä½ç½®ï¼paths.phpå~runtime.phpï¼åè æ¯éæ ¸å¿ä¸´æ¶æ件ï¼èå¼ä¹ã
3ï¼æå¼
paths.phpï¼å¯ä»¥æ¾å°HTML_PATHçè¿ä¸è¡ä»£ç ï¼define('HTML_PATH',APP_PATH.'/'.HTML_DIR.'
/');ï¼çæ¤å¤å¯ç¥ï¼HTML_PATHçç»æä¸ç³»ç»åéHTML_PATHæ å ³ï¼èæ¯ç±å¦å¤ä¸¤ä¸ªç³»ç»åéæ¼åèæã
å ¶ä¸
APP_PATH为项ç®æå¨è·¯å¾ï¼HTML_DIR追踪ä¹ï¼å¯å¨åä¸æ件å æ¾å°ä»£ç ï¼define('HTML_DIR',
'Html');èè¿ä¸ªHtmlæ件夹æ£æ¯ææä¹æ¹é½æ¹ä¸æçç¼ååæ¾è·¯å¾ï¼äºæ¯æ¹ä¹ï¼å Runtimeï¼å 为åé¢å¯ä»¥çå°è¯¥ä¸´æ¶æ件夹æåæ¾
HTML_PATHåéï¼ï¼å·æ°ï¼æå解å³
2ï¼
æå¼View.class.phpï¼ç¨eclipseçoutlineè§å¾æ¥ç该类çç»æï¼åç°ä¸æ¹æ³å为ï¼buildHtml()ï¼å建éæ页é¢ãæ¤æ¹
æ³æä¸è¡ä»£ç 为ï¼$htmlpath = !empty($htmlpath)?$htmlpath:HTML_PATH;
è¿è¡ä»£ç å¾
æ¾ç¶æ¯å®ä¹éæ页é¢çè·¯å¾çï¼å ¶ä¸å¯ä»¥çå°åé¢è¯´å°çHTML_PATHã使ç¨eclipseçæ¥çåéæºä½ç½®ï¼æä½ctrlï¼é¼ æ å·¦é®ç¹å»åéï¼ï¼å¯ä»¥
çå°æ2个ä¾è¿½è¸ªçåéæºä½ç½®ï¼paths.phpå~runtime.phpï¼åè æ¯éæ ¸å¿ä¸´æ¶æ件ï¼èå¼ä¹ã
3ï¼æå¼
paths.phpï¼å¯ä»¥æ¾å°HTML_PATHçè¿ä¸è¡ä»£ç ï¼define('HTML_PATH',APP_PATH.'/'.HTML_DIR.'
/');ï¼çæ¤å¤å¯ç¥ï¼HTML_PATHçç»æä¸ç³»ç»åéHTML_PATHæ å ³ï¼èæ¯ç±å¦å¤ä¸¤ä¸ªç³»ç»åéæ¼åèæã
å ¶ä¸
APP_PATH为项ç®æå¨è·¯å¾ï¼HTML_DIR追踪ä¹ï¼å¯å¨åä¸æ件å æ¾å°ä»£ç ï¼define('HTML_DIR',
'Html');èè¿ä¸ªHtmlæ件夹æ£æ¯ææä¹æ¹é½æ¹ä¸æçç¼ååæ¾è·¯å¾ï¼äºæ¯æ¹ä¹ï¼å Runtimeï¼å 为åé¢å¯ä»¥çå°è¯¥ä¸´æ¶æ件夹æåæ¾
HTML_PATHåéï¼ï¼å·æ°ï¼æå解å³
温馨提示:答案为网友推荐,仅供参考