[8] ErrorException in News.php line 217

未定义数组索引: content

  1. $this->assign('act', 6);
  2. $read = $news->where(['id'=>$id])->field('read')->find();
  3. //dump($read);exit;
  4. $reads = $read['read'] +1;
  5. $data = $news->where(['id'=>$id])->update(['read'=>$reads]);
  6. $row = $news->where('id',$id)->field('title,create_time,descript,content,read,keywords')->find();
  7. $wx = $wechat->where('use',1)->field('wechat')->find();
  8. $row['descript'] = str_replace('{微信}', $wx['wechat'], $row['descript']);
  9. $row['content'] = str_replace('{微信}', $wx['wechat'], $row['content']);
  10. $ids = $news->where('id','<',$id)->order('id desc')->field('id,title')->limit(0,1)->find();
  11. $idx = $news->where('id','>',$id)->order('id')->field('id,title')->limit(0,1)->find();
  12. $this->assign('ids', $ids);
  13. $this->assign('idx', $idx);
  14. return view('',['row'=>$row]);
  15. }
  16. }

Call Stack

  1. in News.php line 217
  2. at Error::appError(8, 'Undefined index: con...', '/www/tp5/application...', 217, ['id' => '14', 'news' => object(News), 'wechat' => object(Wechat), ...]) in News.php line 217
  3. at News->xq('14', object(News), object(Wechat))
  4. at ReflectionMethod->invokeArgs(object(News), ['14', object(News), object(Wechat)]) in Container.php line 395
  5. at Container->invokeReflectMethod(object(News), object(ReflectionMethod), ['id' => '14']) in Module.php line 132
  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 137
  11. at Module->exec() in Dispatch.php line 168
  12. at Dispatch->run() in App.php line 432
  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 435
  18. at App->run() in index.php line 21

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_X_ALICDN_DA_VIA 47.246.24.231,163.181.67.243,101.133.199.110
HTTP_ALI_SWIFT_ORIGIN_HOST www.shiyou-edu.com
HTTP_ALI_CDN_APPVIEW_NAME cdn-tengine
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_ALI_SWIFT_FORCE_TTL_CODE 400=0
HTTP_X_CLIENT_SCHEME https
HTTP_X_FORWARDED_FOR 44.204.24.82
HTTP_ALI_SWIFT_STAT_HOST www.shiyou-edu.com
HTTP_ALI_SWIFT_LOG_HOST www.shiyou-edu.com
HTTP_ALI_CDN_REAL_IP 44.204.24.82
HTTP_ALI_CDN_REAL_PORT 48142
HTTP_EAGLEEYE_TRACEID 2ff6189717116143727006982e
HTTP_VIA us18.l1, l2us1.l2, l2et15-7.l2
HTTP_HOST www.shiyou-edu.com
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME shiyou-edu.com
SERVER_PORT 80
SERVER_ADDR 172.16.223.29
REMOTE_PORT
REMOTE_ADDR 44.204.24.82
SERVER_SOFTWARE nginx/1.18.0
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/tp5/public
DOCUMENT_URI /index.php
REQUEST_URI /index/news/xq/id/14
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/index/news/xq/id/14
SCRIPT_FILENAME /www/tp5/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711614373.4129
REQUEST_TIME 1711614373
Environment Variablesempty
ThinkPHP Constantsempty