[0] TemplateNotFoundException in Think.php line 86

模板文件不存在:C:\phpStudy\PHPTutorial\WWW\px06\application\index\view\about\index.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('', ['company' => object(Webconfig), 'controller' => 'About', 'action' => 'index', ...], []) in View.php line 178
  3. at View->fetch('', [], []) in Controller.php line 113
  4. at Controller->fetch() in About.php line 20
  5. at About->index()
  6. at ReflectionMethod->invokeArgs(object(About), []) in Container.php line 325
  7. at Container->invokeReflectMethod(object(About), object(ReflectionMethod), ['/index/about/index_html' => '']) in Module.php line 122
  8. at Module->exec() in Url.php line 31
  9. at Url->exec() in Dispatch.php line 163
  10. at Dispatch->run() in App.php line 455
  11. at App->think\{closure}(object(Request), object(Closure), null)
  12. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 142
  13. at Middleware->think\{closure}(object(Request))
  14. at call_user_func(object(Closure), object(Request)) in Middleware.php line 94
  15. at Middleware->dispatch(object(Request)) in App.php line 476
  16. at App->run() in index.php line 21

Environment Variables

GET Data
/index/about/index_html
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
PATH C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\VisualSVN Server\bin;C:\Program Files\TortoiseSVN\bin
SYSTEMROOT C:\Windows
COMSPEC C:\Windows\system32\cmd.exe
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR C:\Windows
PHP_FCGI_MAX_REQUESTS 1000
PHPRC C:/phpStudy/PHPTutorial/php/php-5.6.27-nts/
_FCGI_SHUTDOWN_EVENT_ 1944
HTTP_CONNECTION close
SCRIPT_NAME /index.php
REQUEST_URI /index/about/index.html
QUERY_STRING /index/about/index.html
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_QUERY_STRING /index/about/index.html
REDIRECT_URL /index/about/index.html
REMOTE_PORT 44230
SCRIPT_FILENAME C:/phpStudy/PHPTutorial/WWW/px06/public/index.php
SERVER_ADMIN admin@php.cn
CONTEXT_DOCUMENT_ROOT C:/phpStudy/PHPTutorial/WWW/px06/public
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT C:/phpStudy/PHPTutorial/WWW/px06/public
REMOTE_ADDR 44.192.75.131
SERVER_PORT 80
SERVER_ADDR 172.18.103.154
SERVER_NAME eduforth.com.cn
SERVER_SOFTWARE Apache/2.4.23 (Win32) OpenSSL/1.0.2j mod_fcgid/2.3.9
SERVER_SIGNATURE
SystemRoot C:\Windows
HTTP_HOST eduforth.com.cn
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
REDIRECT_STATUS 200
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711675271.7955
REQUEST_TIME 1711675271
PATH_INFO /index/about/index.html
Environment Variablesempty
ThinkPHP Constantsempty