[8] ErrorException in News.php line 107

未定义数组索引: cate_id

  1. $news_model= db('news');
  2. $result=$news_model
  3. ->field('gdlaser_news.id as news_id,gdlaser_news.title,gdlaser_news.body,gdlaser_news.update_time,
  4. gdlaser_news.writer,gdlaser_news.source,gdlaser_cate.id as cate_id,gdlaser_cate.name as cate_name')
  5. ->join('gdlaser_cate','gdlaser_news.cate_id=gdlaser_cate.id','left')
  6. ->where('gdlaser_news.id','=',$id)->find();
  7. $result['update_time']=date('Y-m-d',$result['update_time']);
  8. $result['next']=db('news')->field('id,title')
  9. ->where("cate_id={$result['cate_id']} and id>{$result['news_id']} and status=0")
  10. ->order('create_time','asc')
  11. ->find();
  12. $result['last']=db('news')->field('gdlaser_news.id,title')
  13. ->where("cate_id={$result['cate_id']} and gdlaser_news.id<{$result['news_id']} and gdlaser_news.status=0")
  14. ->order('gdlaser_news.create_time','desc')
  15. ->find();
  16. $news_model->where('id','=',$id)->setInc('click',1);

Call Stack

  1. in News.php line 107
  2. at Error::appError(8, 'Undefined index: cat...', '/www/wwwroot/gdlaser...', 107, ['id' => '2249.html;', 'news_model' => object(Query), 'result' => ['update_time' => '1970-01-01']]) in News.php line 107
  3. at News->getDetails('2249.html;') in News.php line 145
  4. at News->details(object(Request))
  5. at ReflectionMethod->invokeArgs(object(News), [object(Request)]) in Container.php line 395
  6. at Container->invokeReflectMethod(object(News), object(ReflectionMethod), ['id' => '2249.html;']) in Module.php line 131
  7. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  8. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  9. at Middleware->think\{closure}(object(Request))
  10. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  11. at Middleware->dispatch(object(Request), 'controller') in Module.php line 136
  12. at Module->exec() in Dispatch.php line 168
  13. at Dispatch->run() in App.php line 432
  14. at App->think\{closure}(object(Request), object(Closure), null)
  15. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  16. at Middleware->think\{closure}(object(Request))
  17. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  18. at Middleware->dispatch(object(Request)) in App.php line 435
  19. at App->run() in index.php line 11

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
FCGI_ROLE RESPONDER
SCRIPT_FILENAME /www/wwwroot/gdlaser.org.cn/public/index.php
QUERY_STRING s=/index/news/details/id/2249.html;
REQUEST_METHOD GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME /index.php
REQUEST_URI /index/news/details/id/2249.html;
DOCUMENT_URI /index.php
DOCUMENT_ROOT /www/wwwroot/gdlaser.org.cn/public
SERVER_PROTOCOL HTTP/2.0
REQUEST_SCHEME https
HTTPS on
GATEWAY_INTERFACE CGI/1.1
SERVER_SOFTWARE nginx/1.20.1
REMOTE_ADDR 100.26.140.179
REMOTE_PORT 42192
SERVER_ADDR 172.26.237.34
SERVER_PORT 443
SERVER_NAME gdlaser.org.cn
REDIRECT_STATUS 200
PATH_INFO
HTTP_HOST gdlaser.org.cn
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711644375.2886
REQUEST_TIME 1711644375
Environment Variablesempty
ThinkPHP Constants
DS /
APP_PATH /www/wwwroot/gdlaser.org.cn/public/
ROOT_PATH /www/wwwroot/gdlaser.org.cn/