[8] ErrorException in Category.php line 13

未定义数组下标: 6

  1. use think\Db;
  2. class Category extends Frontend{
  3. public function index(){
  4. $p = $this->request->param('p/d', 1);
  5. $id = $this->request->param('id/d', '');
  6. $cate = $this->cats[$id];
  7. if(!$cate) return http_404();
  8. $this->assign('cate', $cate);
  9. $pagesize = 24;
  10. $sid = ($p - 1) * $pagesize;
  11. $map['status'] = 1;
  12. $map['catid'] = $cate['id'];
  13. $list = Db::name('article')->field('id,catid,title,keywords,description,thumb,updatetime,views')->where($map)->order('id desc')->limit($sid, $pagesize)->select();

Call Stack

  1. in Category.php line 13
  2. at Error::appError() in Category.php line 13
  3. at Category->index()
  4. at ReflectionMethod->invokeArgs() in Container.php line 395
  5. at Container->invokeReflectMethod() in Module.php line 131
  6. at Module->think\route\dispatch\{closure}()
  7. at call_user_func_array() in Middleware.php line 185
  8. at Middleware->think\{closure}()
  9. at call_user_func() in Middleware.php line 130
  10. at Middleware->dispatch() in Module.php line 136
  11. at Module->exec() in Dispatch.php line 168
  12. at Dispatch->run() in App.php line 432
  13. at App->think\{closure}()
  14. at call_user_func_array() in Middleware.php line 185
  15. at Middleware->think\{closure}()
  16. at call_user_func() in Middleware.php line 130
  17. at Middleware->dispatch() 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_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_HOST www.tpic5.com
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME tpic5.com
SERVER_PORT 443
SERVER_ADDR 154.83.15.156
REMOTE_PORT 41796
REMOTE_ADDR 3.91.106.157
SERVER_SOFTWARE nginx/1.24.0
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /www/wwwroot/tpic5.com/public
DOCUMENT_URI /index.php
REQUEST_URI /list/6_1.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/list/6_1.html
SCRIPT_FILENAME /www/wwwroot/tpic5.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711702293.5836
REQUEST_TIME 1711702293
Environment Variablesempty
ThinkPHP Constantsempty