點(diǎn)擊admin.php的時(shí)候報(bào)錯(cuò):Smarty: Unable to load template file 'test.html'
點(diǎn)擊admin.php的時(shí)候報(bào)錯(cuò)(目錄結(jié)構(gòu)是按照你視頻中講解的來配置的,但是就是有點(diǎn)混亂):
( ! )?Fatal error: Uncaught --> Smarty: Unable to load template file 'test.html' <-- thrown in E:\wamp\www\mvc\framework\libs\view\Smarty\sysplugins\smarty_internal_templatebase.php on line?127
源碼都是下載的老師您的
我知道是目錄結(jié)構(gòu)的問題,到底要怎么調(diào)整, 老師您可否把目錄結(jié)構(gòu)發(fā)出來
2016-01-06
老師代碼中tpl的目錄結(jié)構(gòu)是這樣的
,但是在index控制器中的index方法寫的是VIEW::display('test.html');視圖引擎會(huì)直接查找tpl目錄下的test.html文件,而test.html卻是在tpl/admin之下,所以會(huì)報(bào)錯(cuò),只需要改成VIEW::display('admin/test.html');即可解決錯(cuò)誤,這個(gè)個(gè)人理解,如果有什么錯(cuò)誤的地方,可以提出來探討下