[8] ErrorException in Index.php line 1246

未定义数组下标: 0

  1. }
  2. }
  3. // 获取分类
  4. // 大分类
  5. $first = Cache::store('redis')->get('wenda_first_category_'.$type);
  6. if (!$first) {
  7. $sql = "select name from violet_main_qa_class where id = ".$type;
  8. $first = Db::query($sql)[0]['name'];
  9. Cache::store('redis')->set('wenda_first_category_'.$type, $first, 3600*5);
  10. }
  11. // 子分类
  12. $second = Cache::store('redis')->get('wenda_second_category_'.$type);
  13. if (!$second) {
  14. $sql = "select id,name from violet_main_qa_class where parent_id = ".$type;
  15. $second = Db::query($sql);
  16. Cache::store('redis')->set('wenda_second_category_'.$type, $second, 3600*5);
  17. }

Call Stack

  1. in Index.php line 1246
  2. at Error::appError(8, 'Undefined offset: 0', '/www/wwwroot/www.fan...', 1246, ['type' => 0, 'stype' => 8, 'page' => 1, ...]) in Index.php line 1246
  3. at Index->wendalist()
  4. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  5. at App::invokeMethod([object(Index), 'wendalist'], []) in App.php line 611
  6. at App::module(['index', 'index', 'wendalist'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['index', 'index', 'wendalist'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  8. at App::run() in start.php line 19
  9. at require('/www/wwwroot/www.fan...') in index.php line 420

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty

Session

think
{ "areaid": 1 }

Server/Request Data

USER
www
HOME
/home/www
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
www.fanglingdi.com
PATH_INFO
/wenda/list-0-8.html
REDIRECT_STATUS
200
SERVER_NAME
www.fanglingdi.com
SERVER_PORT
443
SERVER_ADDR
172.19.73.175
REMOTE_PORT
49658
REMOTE_ADDR
3.91.19.28
SERVER_SOFTWARE
nginx/1.22.1
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/www/wwwroot/www.fanglingdi.com/fld/public
DOCUMENT_URI
/index.php
REQUEST_URI
/wenda/list-0-8.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/wenda/list-0-8.html
SCRIPT_FILENAME
/www/wwwroot/www.fanglingdi.com/fld/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711628964.786
REQUEST_TIME
1711628964
ALL_HTTP
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/www.fanglingdi.com/fld/public/../application/
PC_PATH
/www/wwwroot/www.fanglingdi.com/fld/public/../application/index/view/
_PATH
/www/wwwroot/www.fanglingdi.com/fld/public/..//
A_PATH
/www/wwwroot/www.fanglingdi.com/fld/public/..//a/
THINK_VERSION
5.0.24
THINK_START_TIME
1711628964.7863
THINK_START_MEM
408960
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.fanglingdi.com/fld/thinkphp/
LIB_PATH
/www/wwwroot/www.fanglingdi.com/fld/thinkphp/library/
CORE_PATH
/www/wwwroot/www.fanglingdi.com/fld/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www.fanglingdi.com/fld/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www.fanglingdi.com/fld/
EXTEND_PATH
/www/wwwroot/www.fanglingdi.com/fld/extend/
VENDOR_PATH
/www/wwwroot/www.fanglingdi.com/fld/vendor/
RUNTIME_PATH
/www/wwwroot/www.fanglingdi.com/fld/runtime/
LOG_PATH
/www/wwwroot/www.fanglingdi.com/fld/runtime/log/
CACHE_PATH
/www/wwwroot/www.fanglingdi.com/fld/runtime/cache/
TEMP_PATH
/www/wwwroot/www.fanglingdi.com/fld/runtime/temp/
CONF_PATH
/www/wwwroot/www.fanglingdi.com/fld/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false