2003网站太阳集团(中国)有限公司|官方网站

#0 [8]ErrorException in CaseController.php line 66

未定义数组索引: hits

  1. $this->assign('case_list',$case_list);
  2. return $this->fetch(':case');
  3. }
  4. public function detail()
  5. {
  6. $id = $this->request->param('id');
  7. $PortalCaseClassModel = new PortalCaseClassModel();// 上级
  8. $PortalCaseModel = new PortalCaseModel();
  9. $pro_detail_one = $PortalCaseModel->where(['id'=>$id])->find();
  10. $data['hits'] = $pro_detail_one['hits'] += 1;
  11. $PortalCaseModel->where(['id'=>$id])->save($data);
  12. if (!$id) {
  13. $this->error("产品不存在",url('/portal/product'));
  14. }
  15. $this->assign('pro_detail_one',$pro_detail_one);
  16. $category_one = $PortalCaseClassModel->where(['id'=>$pro_detail_one['fid']])->field('id,parentid,name')->find();
  17. $this->assign('category_one',$category_one);

Call Stack

  1. in CaseController.php line 66
  2. at Error->appError(8, 'Undefined index: hit...', '/data/user/htdocs/ap...', 66, ['id' => '3', 'PortalCaseClassModel' => object(PortalCaseClassModel), 'PortalCaseModel' => object(PortalCaseModel), ...]) in CaseController.php line 66
  3. at CaseController->detail()
  4. at ReflectionMethod->invokeArgs(object(CaseController), []) in Container.php line 344
  5. at Container->invokeReflectMethod(object(CaseController), object(ReflectionMethod), ['id' => '3']) in Controller.php line 146
  6. at Controller->think\route\dispatch\{closure}(object(Request)) in Pipeline.php line 59
  7. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  8. at Pipeline->then(object(Closure)) in Controller.php line 149
  9. at Controller->exec() in Dispatch.php line 90
  10. at Dispatch->run() in Route.php line 772
  11. at Route->think\{closure}(object(Request)) in Pipeline.php line 59
  12. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  13. at Pipeline->then(object(Closure)) in Route.php line 773
  14. at Route->dispatch(object(Request), object(Closure)) in Http.php line 217
  15. at Http->dispatchToRoute(object(Request)) in Http.php line 207
  16. at Http->think\{closure}(object(Request)) in Pipeline.php line 59
  17. at Pipeline->think\{closure}(object(Request)) in SessionInit.php line 67
  18. at SessionInit->handle(object(Request), object(Closure))
  19. at call_user_func([object(SessionInit), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  20. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  21. at Pipeline->think\{closure}(object(Request)) in TraceDebug.php line 71
  22. at TraceDebug->handle(object(Request), object(Closure))
  23. at call_user_func([object(TraceDebug), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  24. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  25. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  26. at Pipeline->then(object(Closure)) in Http.php line 208
  27. at Http->runWithRequest(object(Request)) in Http.php line 171
  28. at Http->run() in index.php line 32

Environment Variables

GET Data
id 3
POST Dataempty
Filesempty
Cookies
PHPSESSID 50ebf0074274b60eaff6af4c756bda6a
ASPSESSIONIDAAAACCDD CGLPIKOALMAKLLIEOMPFGJPJ
Session
last_time 1709804480
Server/Request Data
USER nobody
HOME /
HTTP_COOKIE PHPSESSID=50ebf0074274b60eaff6af4c756bda6a; ASPSESSIONIDAAAACCDD=CGLPIKOALMAKLLIEOMPFGJPJ
HTTP_ACCEPT_ENCODING gzip
HTTP_ACCEPT */*
HTTP_HOST www.1-jian.cn
HTTP_USER_AGENT Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)
REDIRECT_STATUS 200
SERVER_NAME www.1-jian.cn
SERVER_PORT 443
SERVER_ADDR 10.19.95.88
REMOTE_PORT 46246
REMOTE_ADDR 104.206.95.22
SERVER_SOFTWARE nginx/1.18.0
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /data/user/htdocs/public
DOCUMENT_URI /index.php
REQUEST_URI /portal/case/detail.html?id=3
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=//portal/case/detail.html&id=3
PATH_INFO
SCRIPT_FILENAME /data/user/htdocs/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1709804518.8478
REQUEST_TIME 1709804518
0.033498s