[8] ErrorException in ArticleController.php line 80

未定义变量: parent_id

  1. Db::name('portal_post')->where('id', $articleId)->setInc('post_hits');
  2. hook('portal_before_assign_article', $article);
  3. $this->assign('article', $article);
  4. $this->assign('prev_article', $prevArticle);
  5. $this->assign('next_article', $nextArticle);
  6. $this->assign('parent_id', $parent_id);
  7. $tplName = empty($article['more']['template']) ? $tplName : $article['more']['template'];
  8. return $this->fetch("/$tplName");
  9. }
  10. // 文章点赞
  11. public function doLike()
  12. {

Call Stack

  1. in ArticleController.php line 80
  2. at Error::appError(8, 'Undefined variable: ...', '/home/wwwroot/www_qh...', 80, ['portalCategoryModel' => object(PortalCategoryModel), 'postService' => object(PostService), 'articleId' => 199, ...]) in ArticleController.php line 80
  3. at ArticleController->index()
  4. at ReflectionMethod->invokeArgs(object(ArticleController), []) in Container.php line 395
  5. at Container->invokeReflectMethod(object(ArticleController), object(ReflectionMethod), ['id' => '199', 'convert' => false]) in Module.php line 131
  6. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  7. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  8. at Middleware->think\{closure}(object(Request))
  9. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  10. at Middleware->dispatch(object(Request), 'controller') in Module.php line 136
  11. at Module->exec() in Dispatch.php line 168
  12. at Dispatch->run() in App.php line 484
  13. at App->think\{closure}(object(Request), object(Closure), null)
  14. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  15. at Middleware->think\{closure}(object(Request))
  16. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  17. at Middleware->dispatch(object(Request)) in App.php line 487
  18. at App->run() in index.php line 33

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER
www
HOME
/home/www
HTTP_ACCEPT_ENCODING
deflate, gzip
HTTP_ACCEPT
*/*
HTTP_HOST
www.qhxqjt.com
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
PATH_INFO
REDIRECT_STATUS
200
SERVER_NAME
www.qhxqjt.com
SERVER_PORT
80
SERVER_ADDR
211.149.245.25
REMOTE_PORT
20000
REMOTE_ADDR
154.209.208.169
SERVER_SOFTWARE
nginx/1.15.10
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/www_qhxqjt_com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/article/199.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/article/199.html
SCRIPT_FILENAME
/www/wwwroot/www_qhxqjt_com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1600807968.2132
REQUEST_TIME
1600807968
Environment Variablesempty
ThinkPHP Constants
APP_DEBUG
true
CMF_ROOT
/home/wwwroot/www_qhxqjt_com/
CMF_DATA
/home/wwwroot/www_qhxqjt_com/data/
APP_PATH
/home/wwwroot/www_qhxqjt_com/app/
WEB_ROOT
/home/wwwroot/www_qhxqjt_com/public/
HTMLPURIFIER_PREFIX
/home/wwwroot/www_qhxqjt_com/vendor/ezyang/htmlpurifier/library
0.095537s