[0] TemplateNotFoundException in Think.php line 86

模板文件不存在:template/pc/lists/company.html

  1. public function fetch($template, $data = [], $config = [])
  2. {
  3. if ('' == pathinfo($template, PATHINFO_EXTENSION)) {
  4. // 获取模板文件名
  5. $template = $this->parseTemplate($template);
  6. }
  7. // 模板不存在 抛出异常
  8. if (!is_file($template)) {
  9. throw new TemplateNotFoundException('template not exists:' . $template, $template);
  10. }
  11. // 记录视图信息
  12. $this->app
  13. ->log('[ VIEW ] ' . $template . ' [ ' . var_export(array_keys($data), true) . ' ]');
  14. $this->template->fetch($template, $data, $config);
  15. }

Call Stack

  1. in Think.php line 86
  2. at Think->fetch('template/pc/lists/co...', ['CATEGORYS' => [['id' => 1, 'parent_id' => 0, 'catid' => 0, ...], ['id' => 2, 'parent_id' => 1, 'catid' => 0, ...], ['id' => 3, 'parent_id' => 1, 'catid' => 0, ...], ...], 'catid' => null, 'parentid' => null, ...], []) in View.php line 189
  3. at View->fetch('company', ['CATEGORYS' => [['id' => 1, 'parent_id' => 0, 'catid' => 0, ...], ['id' => 2, 'parent_id' => 1, 'catid' => 0, ...], ['id' => 3, 'parent_id' => 1, 'catid' => 0, ...], ...], 'catid' => null, 'parentid' => null, ...]) in View.php line 35
  4. at View->output('company') in Response.php line 396
  5. at Response->getContent() in Response.php line 128
  6. at Response->send() in index.php line 25