/**
* Class Index
* @package app\controller
* @Group("index")
*/
class Index extends Base
{
/**
* @param View $view
* @return View
* @Route("/", method="GET")
*/
public function index()
{
return view();
}
}
#0 [0]TemplateNotFoundException in Think.php line 146
模板文件不存在:XXX\XXXWEBSYS\view\.html
}
if ('' == pathinfo($template, PATHINFO_EXTENSION)) {
// 获取模板文件名
$template = $this->parseTemplate($template);
}
// 模板不存在 抛出异常
if (!is_file($template)) {
throw new TemplateNotFoundException('template not exists:' . $template, $template);
}
// 记录视图信息
$this->app['log']
->record('[ VIEW ] ' . $template . ' [ ' . var_export(array_keys($data), true) . ' ]');
$this->template->fetch($template, $data);
}
按道理应该是:XXX\XXXWEBSYS\view\index\index.html 最佳答案
