[0] TemplateNotFoundException in Think.php line 80

模板文件不存在:/home/webroot/demo/chn/app/home/view/index_work.html

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

Call Stack

  1. in Think.php line 80
  2. at Think->fetch('/home/webroot/demo/c...', ['dibu' => [['link_id' => 10, 'name' => '地址', 'url' => '...', ...], ['link_id' => 8, 'name' => '电话', 'url' => '+86-029-88485673<br>...', ...], ['link_id' => 11, 'name' => '邮箱', 'url' => 'marketing@vjpaaqj.net', ...], ...]], []) in View.php line 159
  3. at View->fetch('', ['dibu' => [['link_id' => 10, 'name' => '地址', 'url' => '...', ...], ['link_id' => 8, 'name' => '电话', 'url' => '+86-029-88485673<br>...', ...], ['link_id' => 11, 'name' => '邮箱', 'url' => 'marketing@vjpaaqj.net', ...], ...]], [], []) in Controller.php line 112
  4. at Controller->fetch() in Index.php line 16
  5. at Index->__construct()
  6. at ReflectionClass->newInstanceArgs([]) in App.php line 216
  7. at App::invokeClass('app\home\controller\...') in Loader.php line 420
  8. at Loader::controller('index', 'controller', false, 'EmptyController') in App.php line 391
  9. at App::module(['home', 'index', 'work'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 296
  10. at App::exec(['type' => 'module', 'module' => ['home', 'index', 'work']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 124
  11. at App::run() in start.php line 18
  12. at require('/home/webroot/demo/c...') in index.php line 23

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

REDIRECT_UNIQUE_ID
XbDI1UMR1vmxLLTGzgTmbwAAABQ
REDIRECT_STATUS
200
UNIQUE_ID
XbDI1UMR1vmxLLTGzgTmbwAAABQ
HTTP_USER_AGENT
CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_ACCEPT_ENCODING
gzip, deflate
HTTP_REFERER
http://www.vjpaaqj.net/
HTTP_HOST
www.vjpaaqj.net
HTTP_CONNECTION
keep-alive
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
HTTP_ACCEPT_LANGUAGE
zh-CN,zh
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache/2.4.6 (CentOS) PHP/7.1.17
SERVER_NAME
www.vjpaaqj.net
SERVER_ADDR
172.31.231.185
SERVER_PORT
80
REMOTE_ADDR
23.19.74.95
DOCUMENT_ROOT
/home/webroot/demo/chn
REQUEST_SCHEME
http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/home/webroot/demo/chn
SERVER_ADMIN
root@localhost
SCRIPT_FILENAME
/home/webroot/demo/chn/index.php
REMOTE_PORT
48336
REDIRECT_URL
/home/index/work
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/home/index/work
SCRIPT_NAME
/index.php
PATH_INFO
/home/index/work
PATH_TRANSLATED
redirect:/index.php/home/index/work/index/work
PHP_SELF
/index.php/home/index/work
REQUEST_TIME_FLOAT
1571866837.437
REQUEST_TIME
1571866837
Environment Variables
empty

ThinkPHP Constants

__PUBLIC__
/public
APP_PATH
/home/webroot/demo/chn/app/
DATA_PATH
/home/webroot/demo/chn/runtime/Data/
PLUGIN_PATH
/home/webroot/demo/chn/plugins/
THINK_VERSION
5.0.11
THINK_START_TIME
1571866837.438
THINK_START_MEM
360392
EXT
.php
DS
/
THINK_PATH
/home/webroot/demo/chn/think/
LIB_PATH
/home/webroot/demo/chn/think/library/
CORE_PATH
/home/webroot/demo/chn/think/library/think/
TRAIT_PATH
/home/webroot/demo/chn/think/library/traits/
ROOT_PATH
/home/webroot/demo/chn/
EXTEND_PATH
/home/webroot/demo/chn/extend/
VENDOR_PATH
/home/webroot/demo/chn/vendor/
RUNTIME_PATH
/home/webroot/demo/chn/runtime/
LOG_PATH
/home/webroot/demo/chn/runtime/log/
CACHE_PATH
/home/webroot/demo/chn/runtime/cache/
TEMP_PATH
/home/webroot/demo/chn/runtime/temp/
CONF_PATH
/home/webroot/demo/chn/app/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
UPLOAD_PATH
./Uploads/