Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

经常莫名奇妙的报错,模板不存在 #11

Open
chenlongming opened this issue Aug 23, 2017 · 0 comments
Open

经常莫名奇妙的报错,模板不存在 #11

chenlongming opened this issue Aug 23, 2017 · 0 comments

Comments

@chenlongming
Copy link

chenlongming commented Aug 23, 2017

报错的模板路径是 /application/admin/view/form.html

[0] TemplateNotFoundException in Template.php line 1086

模板文件不存在:D:\project\tpadmin\public/../application/admin\view\form.html

}
            $template = $path . $template . '.' . ltrim($this->config['view_suffix'], '.');
        }

        if (is_file($template)) {
            // 记录模板文件的更新时间
            $this->includeFile[$template] = filemtime($template);
            return $template;
        } else {
            throw new TemplateNotFoundException('template not exists:' . $template, $template);
        }
    }

    /**
     * 按标签生成正则
     * @access private
     * @param  string $tagName 标签名
     * @return string
     */

Call Stack

in Template.php line 1086
at Template->parseTemplateFile('D:\project\tpadmin\p...') in Template.php line 1046
at Template->parseTemplateName('form') in Template.php line 484
at Template->think{closure}(' ...') in Template.php line 500
at Template->parseInclude(' ...') in Template.php line 381
at Template->parse(' ...') in Template.php line 341
at Template->compiler(' ...', 'D:\project\tpadmin\r...') in Template.php line 190
at Template->fetch('D:\project\tpadmin\p...', ['list' => object(Bootstrap), 'count' => 14, 'page' => null, ...], []) in Think.php line 84
at Think->fetch('D:\project\tpadmin\p...', ['list' => object(Bootstrap), 'count' => 14, 'page' => null, ...], []) in View.php line 159
at View->fetch() in Controller.php line 44
at Article->index()
at ReflectionMethod->invokeArgs(object(Article), []) in App.php line 196
at App::invokeMethod([object(Article), 'index'], []) in App.php line 408
at App::module(['admin', 'article', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...], true) in App.php line 295
at App::exec(['type' => 'module', 'module' => ['admin', 'article', 'index']], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...]) in App.php line 123
at App::run() in start.php line 18
at require('D:\project\tpadmin\t...') in index.php line 17

现在解决办法是重新下载后,覆盖掉新的 application 文件夹。虽然可以解决,但是因为问题多次出现了,希望能找到出错的原因

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant