配置:'view_path' => '.\view\\'
報錯信息:模板文件不存在:.\view\index\index.html
模板文件實際是存在的,試了下,只有寫絕對路徑才能正確找到模板文件
return $this->fetch('D:/Program Files/php/Apache24/htdocs/match/application/view/index/index.html');
模板路徑拼接問題,將配置改為 'view_path' => '../application/view/' 就可以了。
另外經測試,view_path中使用/或\都可以。