[8] ErrorException in Krj.php line 247

未定义数组索引: cate_id

  1. empty($data['info'])?$data['info']=[]:$data['info'];
  2. }
  3. if(empty($data['video']))$data['video'] = $data['video_url'];
  4. //$a=htmlspecialchars_decode($data['gn_desc']);
  5. //当前分类全部产品
  6. $pre=null;
  7. $next=null;
  8. $allCp=Db::table(tablename('krj_cpgl'))->where(['cate_id'=>$data['cate_id']])->order('orderby')->select();
  9. foreach($allCp as $k=>$v){
  10. if($v['id']==$id){
  11. if(array_key_exists($k-1,$allCp)){
  12. $next=$allCp[$k-1]['id'];
  13. }
  14. if(array_key_exists($k+1,$allCp)){
  15. $pre=$allCp[$k+1]['id'];
  16. }

Call Stack

  1. in Krj.php line 247
  2. at Error::appError(8, 'Undefined index: cat...', '/data/user/htdocs/ap...', 247, ['id' => '24', 'data' => ['video' => null], 'pre' => null, ...]) in Krj.php line 247
  3. at Krj->productdel()
  4. at ReflectionMethod->invokeArgs(object(Krj), []) in Container.php line 395
  5. at Container->invokeReflectMethod(object(Krj), object(ReflectionMethod), ['id' => '24']) 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 20

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER nobody
HOME /
HTTP_HOST coorig.cn
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
REDIRECT_STATUS 200
SERVER_NAME coorig.cn
SERVER_PORT 443
SERVER_ADDR 10.19.223.134
REMOTE_PORT 49398
REMOTE_ADDR 44.204.24.82
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
DOCUMENT_URI /index.php
REQUEST_URI /web/krj/productdel/id/24.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=//web/krj/productdel/id/24.html
PATH_INFO
SCRIPT_FILENAME /data/user/htdocs/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711664208.713
REQUEST_TIME 1711664208
Environment Variablesempty
ThinkPHP Constantsempty