[8] ErrorException in Library.php line 200

未定义数组下标: 0

  1. // 查询上级分类
  2. $sql = "select name from violet_library where del = 0 and status = 1 and libraryid = ".$res[0]['parentid'];
  3. $parent = Db::query($sql);
  4. $res[0]['parent_name'] = $parent[0]['name'];
  5. // 获取所有的三级分类
  6. $sql = "select libraryid,name,parentid from violet_library where del = 0 and status = 1 and parentid = ".$libraryid;
  7. $third = Db::query($sql);
  8. $third_str = $res[0]['libraryid'].',';
  9. } else {
  10. $this->redirect('/zhuanti/detail/'.$res[0]['libraryid'].'.html');
  11. }
  12. if ($third_str) {
  13. if ($third) {
  14. foreach ($third as $t) {
  15. $third_str .= $t['libraryid'].',';
  16. }
  17. }
  18. // 查询文章

Call Stack

  1. in Library.php line 200
  2. at Error::appError(8, 'Undefined offset: 0', '/www/wwwroot/www.fan...', 200, ['libraryid' => '38', 'page' => 1, 'page_flg' => '', ...]) in Library.php line 200
  3. at Library->lists()
  4. at ReflectionMethod->invokeArgs(object(Library), []) in App.php line 343
  5. at App::invokeMethod([object(Library), 'lists'], []) in App.php line 611
  6. at App::module(['index', 'library', 'lists'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['index', 'library', 'lists'], '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_REFERER
http://www.fanglingdi.com/zhuanti/38.html
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
www.fanglingdi.com
PATH_INFO
/zhuanti/38.html
REDIRECT_STATUS
200
SERVER_NAME
www.fanglingdi.com
SERVER_PORT
443
SERVER_ADDR
172.19.73.175
REMOTE_PORT
45926
REMOTE_ADDR
44.200.169.91
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
/zhuanti/38.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/zhuanti/38.html
SCRIPT_FILENAME
/www/wwwroot/www.fanglingdi.com/fld/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711646130.3948
REQUEST_TIME
1711646130
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
1711646130.3952
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